Page 1 of 1

Delete a Line of a URL

Posted: Thu Dec 22, 2011 8:41 pm
by maxvit99
Hi, I have problems when I want to delete a line in a url

Code: Select all

delete line gline of URL ("file:" & $USERPROFILE & "\Documents\AllDescriptions.txt")
It gives me an error like this:
button "Delete": execution error at line 6 (Chunk: can't find object), char 4
Is there a way to do that :?:

Re: Delete a Line of a URL

Posted: Thu Dec 22, 2011 9:24 pm
by mwieder
Not in that compact a form, no.

Code: Select all

    put URL ("file:" & $USERPROFILE & "/Documents/AllDescriptions.txt") into tFile
    delete line gline of tFile
    put tFile into URL ("file:" & $USERPROFILE & "/Documents/AllDescriptions.txt")

Re: Delete a Line of a URL

Posted: Thu Dec 22, 2011 10:14 pm
by maxvit99
Thank you so much,

Max :D

Re: Delete a Line of a URL

Posted: Thu Dec 22, 2011 10:38 pm
by mwieder
NP. I think three lines isn't bad, considering all the work that's going on behind the scenes.