sc4ry Posted June 29, 2007 Share Posted June 29, 2007 hey, i don´t understand, whats going wrong. i want to start different tools within my program. you can select them on first start of the program and after that it is saved to an ini-file. on next boot, my program will be automaticly loaded and will start the tools which were selectet and saved in the ini. but then the following error appear --------------------------- AutoIt Error --------------------------- Line 0 (File "F:\AutoScrIpTs\Henkel\S.T.A.R.T.E.R_V3.exe"): For $i = 1 To $var[0][0] For $i = 1 To $var^ ERROR Error: Subscript used with non-Array variable. --------------------------- OK --------------------------- But if i run my tool after the start of my pc, there will be NO error and all my tools are running form my script. here is the error (but only when my scipt starts after the boot) ;starte programme If $RunOwnTools = "1" Then $var = IniReadSection ( $ini, "Run own tools after Start") For $i = 1 To $var[0][0] Run(@ComSpec & ' /c "' & $var[$i][1] & '"', "", @SW_HIDE) Next Else EndIf and here is the whole script [autoit] ; S.T.A.R.T.E.R V.3 ; ; Link to comment Share on other sites More sharing options...
Developers Jos Posted June 29, 2007 Developers Share Posted June 29, 2007 pretty sure the ini file isn't found thus $var isn;t an Array Test for @error=0 to ensure the IniReadSection() worked ... 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...
sc4ry Posted June 29, 2007 Author Share Posted June 29, 2007 because there are some other functions before my scirpt run the tools, i know, that the ini must be found, else the other actions could not be progressed, right? and the ini is there, you can test it yourself. compile this script, start the program, go to tool-settings and add some tools, click 2 times ok. after that run the script second time ... all your tools will start. then restart your pc (script is only in autostart folder) ... the script will run with this error. confrim error and after that run the script again ... all you tools will start again ... you see? that what i can´t catch Link to comment Share on other sites More sharing options...
Developers Jos Posted June 29, 2007 Developers Share Posted June 29, 2007 because there are some other functions before my scirpt run the tools, i know, that the ini must be found, else the other actions could not be progressed, right?and the ini is there, you can test it yourself.compile this script, start the program, go to tool-settings and add some tools, click 2 times ok.after that run the script second time ... all your tools will start.then restart your pc (script is only in autostart folder) ... the script will run with this error. confrim error and after that run the script again ... all you tools will start again ... you see?that what i can´t catchJust put the FileExist() in your script with an msgbox() and test it yourself... I cannot think of any other reason .. 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...
sc4ry Posted June 30, 2007 Author Share Posted June 30, 2007 ok, it runs perfectly, if i add @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