Re: Re: Command "Ini DELETE" not working

Dimitris Keletsekis <[email protected]> Thu, 2 Feb 2012 13:43:15 +0200
Newsgroups gmane.comp.windows.gui4cli
Message-ID <CAHiKg1XcMyNoevjiUsbFDLW2u-w6Zyz2nbPY1SQR=Sy1M+zkVw@mail.gmail.com>
I'm still here, and will get around to making some corrections sometime
since I still use g4c every day, but I'm buried in work at the moment.
Thankfully there's ingenuity enough out there to get around the problems :-)

All the best,
Dimitris



On Thu, Feb 2, 2012 at 9:58 AM, peejayay <[email protected]> wrote:

> **
>
>
> Hi Fred,
>
> I realise that it is possible to do it programatically, it is just that I
> was hoping for some kind of patch to get it working, so that the next
> person who tries to use the command doesn't spend a lot of time thinking
> that they have done something wrong, like I did.
>
> But I would like to thank you anyway for taking the time to come up with
> this solution, it certainly saves me doing it.
>
> Hopefully there is someone out there with access to the code who can
> actually provide a patch for all of us.
>
> Thanks
>
> peejayay
>
>
> --- In [email protected], "fredfjord@..." <fredfjord@...> wrote:
> >
> > I tried something but it does not change the file...
> >
> > Unless somebody knows how to use it you can try something like this:
> >
> > xlistview 10 10 10 10 "ini" "" ""
> > id lv_ini
> > attr show hide
> >
> >
> > xRoutine IniDeleteSection filename sectionname
> > local found/line
> >
> > Use LV #this lv_ini
> > lv load "$filename"
> > found = 1
> > lvsearch "[$sectionname]" first lines
> >
> > while $$lv.valid=1
> > and $found=1
> > lv delete current
> > lv goto next
> > line = $$lv.full
> > if $line[0][1] = "["
> > found = 0 // found new start of section, break
> > endif
> > endwhile
> >
> > lv save "$filename"
> > // lv clear
> >
> >
> >
> > call it like this:
> > gosub #this IniDeleteSection initest.ini mysection
> >
> > Test it for yourself, i made this quick and is not fully tested!
> >
> >
> >
> > --- In [email protected], "peejayay" <thepauladams@> wrote:
> > >
> > > Hi, I am trying to remove some ini file entries using the "Ini DELETE"
> command, but it just does not seem to work.
> > >
> > > Nothing happens at all when calling this command. If I mistype an
> entry, it comes up with an error message that the section cannot be found,
> so the command is definitely reading the file and checking that the
> sections exist, but then it does not delete anything and the file timestamp
> is left alone.
> > >
> > > I am running on Windows XP Professional.
> > >
> > > Any ideas?
> > >
> > > peejayay
> > >
> >
>
>  
>