Jump to content

Recommended Posts

Posted

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

;

;

Posted

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

  • Developers
Posted

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

Just 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.
  :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...