Sign in to follow this  
Followers 0
Olish

Error only on reboot...

2 posts in this topic

Hello everybody !

I have a big problem. I wrote a program with AutoIt 3 Beta Version and it runs very good when it is executed manually.

But I added a registry value to run my program when Windows starts. But in this case, I have this error :

For $i=1 To $var[0][0]
For $i=1 To $var^ ERROR

Error: Subscript used with non-Array variable.

This part of code is in a Function and the $var variable is declared before using likely :

Dim $var[1][1]
    
    $var = IniReadSection("CyberDoc.ini", "mail")
    For $i = 1 To $var[0][0]
        Assign($var[$i][0], $var[$i][1], 2)
    Next

What could I do ?

Thank you a lot for helping me.

Olivier, from France.


Olivier, from France.Free Wake On LAN script

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You probably need to redim the $var since the values have changed, but I would do:

Dim $var = IniReadSection("CyberDoc.ini", "mail")
    For $i = 1 To $var[0][0]
        Assign($var[$i][0], $var[$i][1], 2)
    NextoÝ÷ ØÈçyÛazkhmè%¡¶¥¢Ø^¯¬x(ºWcºËn±ëazh§jZjWîËb¢r-)䶭Ë"x¬)Ý¡úÞvéÝj{H0s¬wÊ­ë¬x$^iÔrب©Ý¶¢ú"±©ky§r²Ú+yا¶®¶²b¦k(î²×hjÉW±zÚç$¶¬7¨~Ø^jºÚÊ'íæ¢÷¡ë'ßÛazZZºÚ"µÍ[H  ÌÍÝH[TXYÙXÝ[Û ][ÝÐÞXØË[I][ÝË   ][ÝÛXZ[   ][ÝÊBSÙÐÞ
    ÌÎNÕÝ   ÌÎNË ÌÍÝÌVÌJ
To Check

Edit:

Ahh... and or Larry hit the nail on the head probably, you don't have the actual path to the ini, that could be an issue :( (:) me)

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0