Sign in to follow this  
Followers 0
PsaltyDS

Reserved words list?

10 posts in this topic

I was coding along, singing a song... :lmao:

When CRASH! my whole script castle comes down around my ears! o:)

I traced the problem to one of the functions I created in a new #include file for performing user admin stuff. I formatted some 'NET USER' and 'NET LOCALGROUP' commands into a string variable called $CmdLine and then run it with:

$RetCode = RunWait(@ComSpec & " /c " & $CmdLine, @TempDir, @SW_Show)

Compiled cleanly, but exploded all over the poor monitor when I tried to run it. ;)

Seems the variable $CmdLine is used as a constant by AutoIT to contain the line that called the script or executable. You guys probably new that already, and don't run into that problem.

My question is, where do I find a full list of AutoIT "reserved words" and variable/function names that must not be used except as intended? A search through the help file finaly showed me the usage of $CmdLine, but it was not in the index and took some digging. Is there a complete list somewhere?


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites



I was coding along, singing a song... :lmao:

When CRASH! my whole script castle comes down around my ears! o:)

I traced the problem to one of the functions I created in a new #include file for performing user admin stuff. I formatted some 'NET USER' and 'NET LOCALGROUP' commands into a string variable called $CmdLine and then run it with:

$RetCode = RunWait(@ComSpec & " /c " & $CmdLine, @TempDir, @SW_Show)

Compiled cleanly, but exploded all over the poor monitor when I tried to run it. ;)

Seems the variable $CmdLine is used as a constant by AutoIT to contain the line that called the script or executable. You guys probably new that already, and don't run into that problem.

My question is, where do I find a full list of AutoIT "reserved words" and variable/function names that must not be used except as intended? A search through the help file finaly showed me the usage of $CmdLine, but it was not in the index and took some digging. Is there a complete list somewhere?

index tab of the help file

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

index tab of the help file

Been there, done that, got the collectable mouse pad...

I started from the index, no joy; finally found it with the search tab. It wasn't that direct, really, because I thought my error was from use of '$RetCode' at first, then realized it was '$CmdLine'. I've seen reserved word lists in other contexts, just thought there might be one for AutoIT.


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Been there, done that, got the collectable mouse pad...

I started from the index, no joy; finally found it with the search tab. It wasn't that direct, really, because I thought my error was from use of '$RetCode' at first, then realized it was '$CmdLine'. I've seen reserved word lists in other contexts, just thought there might be one for AutoIT.

i haven't seen one for autoit that i can think of...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Been there, done that, got the collectable mouse pad...

I started from the index, no joy; finally found it with the search tab. It wasn't that direct, really, because I thought my error was from use of '$RetCode' at first, then realized it was '$CmdLine'. I've seen reserved word lists in other contexts, just thought there might be one for AutoIT.

This actually would come in handy personally... Because the only one I know that was 'reserved' other than keywords was $CmdLine / $CmdLineRaw, I have no idea even if there are others.


[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

I was coding along, singing a song... :lmao:

When CRASH! my whole script castle comes down around my ears! o:)

I traced the problem to one of the functions I created in a new #include file for performing user admin stuff. I formatted some 'NET USER' and 'NET LOCALGROUP' commands into a string variable called $CmdLine and then run it with:

$RetCode = RunWait(@ComSpec & " /c " & $CmdLine, @TempDir, @SW_Show)

Compiled cleanly, but exploded all over the poor monitor when I tried to run it. ;)

Seems the variable $CmdLine is used as a constant by AutoIT to contain the line that called the script or executable. You guys probably new that already, and don't run into that problem.

My question is, where do I find a full list of AutoIT "reserved words" and variable/function names that must not be used except as intended? A search through the help file finaly showed me the usage of $CmdLine, but it was not in the index and took some digging. Is there a complete list somewhere?

sorry not my problem :king:


New Owner of this AU account

Share this post


Link to post
Share on other sites

sorry not my problem ;)

Guess we'll remember that when you post a question. :lmao:


[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

Avoid using built-in control statements such as Do-While, Select-Case, If-EndIf as function names :lmao:

Call("Select")

Func Select()
    MsgBox(4096,"this","won't work")
EndFunc

P.S. (In case Valik reads this) I realize that we should not normally use the Call function in these circumstances.


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Avoid using built-in control statements such as Do-While, Select-Case, If-EndIf as function names ;)

Call("Select")

Func Select()
    MsgBox(4096,"this","won't work")
EndFunc

P.S. (In case Valik reads this) I realize that we should not normally use the Call function in these circumstances.

I'm more worried about what will happen with this code after JP integrates my changes. I tested that built-in functions failed but I didn't test what happens when you try to call a non-function keyword. :lmao:

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

sorry not my problem :lmao:

***edit*** removed my original reply, because i was in no state to be posting when i wrote it... Edited by cameronsdad

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

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