tutor2000 Posted July 21, 2004 Share Posted July 21, 2004 if I keep the do until in the script I'm returned an error on the urldownload. If I ; the do until stuff out, the url works ww --------------------------- dircreate(".\WebPageInfo") dircreate(".\Url") filedelete(".\Url\temp.txt" ) do $ini = FileSaveDialog ( "Select Your Ini file to save your web page info in", ".\WebPageInfo", "Or write in a new name (*.ini)", 10 ) if @error = 1 then exit endif if not (stringinstr($ini,".ini")) then msgbox(4096,"Kirkhams Programs", "You must type .ini after your filename") endif until stringinstr($ini,".ini") sleep(100) $ret="" $url = "http://kirkhamsebooks.8m.com" $ret = URLDownloadToFile ( $url, ".\Url\temp.txt" ) if $ret = 0 then msgbox(4096,"Kirkhams Programs", "Unable to download"&@CRLF&$url&@CRLF&"Please get your information directly from the source with View") endif Link to comment Share on other sites More sharing options...
jpm Posted July 21, 2004 Share Posted July 21, 2004 $ini="a.ini"dountil stringinstr($ini,".ini")this is working so can be a problem in your side. Which version of AutoIt are you using? Link to comment Share on other sites More sharing options...
tutor2000 Posted July 21, 2004 Author Share Posted July 21, 2004 this is working so can be a problem in your side. Which version of AutoIt are you using? The official releaseDidn't work at work or at homeIf you're using a beta should I report this as a bug?Rick Link to comment Share on other sites More sharing options...
Developers Jos Posted July 21, 2004 Developers Share Posted July 21, 2004 (edited) The official release Didn't work at work or at home If you're using a beta should I report this as a bug? RickRick, it isn't a bug but a script issue. The $ini = FileSaveDialog changes the current directory. Run this code so you see what i mean.... DirCreate(".\WebPageInfo") DirCreate(".\Url") FileDelete(".\Url\temp.txt") do $INI = FileSaveDialog("Select Your Ini file to save your web page info in", ".\WebPageInfo", "Or write in a new name (*.ini)", 10) If @error = 1 Then Exit EndIf If not (StringInStr($INI, ".ini")) Then MsgBox(4096, "Kirkhams Programs", "You must type .ini after your filename") EndIf Until StringInStr($INI, ".ini") Sleep(100) $RET = "" $URL = "http://kirkhamsebooks.8m.com" Runwait(@comspec) $RET = URLDownloadToFile($URL, ".\Url\temp.txt") If $RET = 0 Then MsgBox(4096, "Kirkhams Programs", "Unable to download" & @CRLF & $URL & @CRLF & "Please get your information directly from the source with View") EndIf Edited July 21, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
tutor2000 Posted July 21, 2004 Author Share Posted July 21, 2004 Rick, it isn't a bug but a script issue. The $ini = FileSaveDialog changes the current directory. Run this code so you see what i mean.... DirCreate(".\WebPageInfo") DirCreate(".\Url") FileDelete(".\Url\temp.txt") do $INI = FileSaveDialog("Select Your Ini file to save your web page info in", ".\WebPageInfo", "Or write in a new name (*.ini)", 10) If @error = 1 Then Exit EndIf If not (StringInStr($INI, ".ini")) Then MsgBox(4096, "Kirkhams Programs", "You must type .ini after your filename") EndIf Until StringInStr($INI, ".ini") Sleep(100) $RET = "" $URL = "http://kirkhamsebooks.8m.com" Runwait(@comspec) $RET = URLDownloadToFile($URL, ".\Url\temp.txt") If $RET = 0 Then MsgBox(4096, "Kirkhams Programs", "Unable to download" & @CRLF & $URL & @CRLF & "Please get your information directly from the source with View") EndIfAhhhhh clever you are (in my best Yoda impression) Thanks buddy now I can work around it by using @scriptdir or even getting the path from an ini Rick Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now