pcjunki Posted October 15, 2015 Share Posted October 15, 2015 (edited) I'm trying to schedule task an inetget download in the middle of the night, so I'm not hogging up my bandwidth.I'm using a ini file to set the url and download location to the pc, ect ectit runs fine compiled and not compiledbut when I schedule task it to run the compiled file, it does not workbelow is my code$url= IniRead("file_download.ini", "url", "link", "") $location= IniRead("file_download.ini", "location", "location", "") $filename= IniRead("file_download.ini", "filename", "filename", "") InetGet($url, $location & $filename) and here is the file_download.ini[URL] link=https://www.autoitscript.com/forum/cdn/images/logo_autoit_210x72.svg [location] location=c:\users\public\desktop\ [filename] filename=logo_autoit_210x72.svg Edited October 15, 2015 by pcjunki Link to comment Share on other sites More sharing options...
AutoBert Posted October 15, 2015 Share Posted October 15, 2015 Are you sure you have a INet-connection when script runs? Link to comment Share on other sites More sharing options...
pcjunki Posted October 15, 2015 Author Share Posted October 15, 2015 yes, after I compile it, I can double click the exe file, and it works fine Link to comment Share on other sites More sharing options...
nitekram Posted October 15, 2015 Share Posted October 15, 2015 I would just use a simple msgbox and compile it and see if that works, as that way you can test to see if a simple script can be scheduled - that way you rule out it being an issue with script or issue with scheduling. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
pcjunki Posted October 15, 2015 Author Share Posted October 15, 2015 no issue with another script and scheduling. Link to comment Share on other sites More sharing options...
Developers Jos Posted October 15, 2015 Developers Share Posted October 15, 2015 Likely is your workdir not equal to the scriptdir when the exe is scheduled, so it can't find the INI.Jos pcjunki 1 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...
pcjunki Posted October 15, 2015 Author Share Posted October 15, 2015 (edited) that was it, I move my 2 files to the root of my disk, and edited the scheduletada! Edited October 15, 2015 by pcjunki Link to comment Share on other sites More sharing options...
Developers Jos Posted October 15, 2015 Developers Share Posted October 15, 2015 (edited) I probably wouldn't have moved the script but rather change the path to the ini into:$url= IniRead(@scriptDir & "\file_download.ini", "url", "link", "")Jos Edited October 15, 2015 by Jos 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...
pcjunki Posted October 15, 2015 Author Share Posted October 15, 2015 I like that allot better, adding the @scriptdir, much better Link to comment Share on other sites More sharing options...
nitekram Posted October 16, 2015 Share Posted October 16, 2015 If I was you, I would take a look at all the macros, as there are some really nice ones out there."The pre-defined macros are generally used to provide easy access to system information like the location of the Windows directory or the name of the logged on user." 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
pcjunki Posted October 16, 2015 Author Share Posted October 16, 2015 I know how to use macros, I just couldn't figure out why a compiled script would work when double clicking it, but would not work when schedule tasking it.I got it to work with @scriptdir 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