Re: Command "Ini DELETE" not working

"peejayay" <[email protected]> Thu, 02 Feb 2012 07:58:20 -0000
Newsgroups gmane.comp.windows.gui4cli
Message-ID <[email protected]>
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
> >
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/gui4cli/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/gui4cli/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/