4 posts in this topic
Error When running complied Script
Okay guys, I have written a script which essentially runs once a week to copy files to a server. It also copies the files to a local directory. When I run in Autoit it works perfectly. When I compile and run I get the attached error. Any help would be appreciated. How should I debug this? I am not a programmer by the way but love Autoit as it has done so much for me.
More reliable check for file
I'm trying to check for the existance of a file, on logon the file is there, then gets deleted and after a while recreated. I'm using this code:
Sleep(100) If not FileExists($sFile) Then Sleep(150) If FileExists($sFile) Then GUICtrlSendToDummy($iDummy) What happens is this:
User logs on, the file is present, or at least it usually is After about 10 seconds the file gets deleted Then after about 50 seconds the file gets created again, this is when I need the check, because now the process is finished. The above code is part of a pretty long do....until false loop running an animation.
The problem is that sometimes this code fails. Without the sleep statements it didn't work at all so I think this is a timing issue. Pretty primitive code I admit, there must be a better way...
how to split string by space but escape spaces inside quotes
I have a string like this:
"Video or movie" "parent" "Media or entertainment" "1" "1" "1" "0" "0" I would like to split it by the spaces but the space inside the quote(both double and single quotes) should be ignored. So the splitted strings should be:
"Video or movie" "parent" "Media or entertainment" "1"
String extraction question
I have a file that has a large amount of line items like the following:
Terms= Sub Total=2.49 Invoice Discount $= Tax Percentage=6 Sales Tax Amount or 'EXEMPT'=0.00 Invoice Total=2.49 Total Paid=0.00 Amount Due=2.49 Change=0.00 Clerk Name= Clerk Number=9998 I need to know how I can extract the dollar value after "Amount Due=" In this case its 2.49. Sometimes it will be between 0.01 and 20.00. How can I get that value? Also note that the number of items above the Amount Due= changes so I cannot use filereadline with the line number.
Select string of text between quotes
I am interested in looking at a chunk of text, selecting the string that is in quotes, and copying it to the clipboard. It will always have quotes at the beginning and end, start with https:// and will always contain .mp3 . But everything else is pretty random. This is an example of a piece of text
I tried doing something like this but it didn't like the quotes.
$sStart = "file: "" $sEnd = ""," $aExtract = _StringBetween($sStart, $sEnd) ClipPut($aExtract)
Or is there a better/easier way to do this?