gamerman2360 Posted October 31, 2006 Share Posted October 31, 2006 Var names can be anything. As long as it does not start with the @ symbol.. Why? MsgBox(0, "Test", Assign("@", "")); returns 0 MsgBox(0, "Test", Assign("@test", "")); returns 0 MsgBox(0, "Test", Assign("te@st", "")); returns 1I think thats the only naming limitation. There is no built in length limit. Link to comment Share on other sites More sharing options...
GaryFrost Posted October 31, 2006 Share Posted October 31, 2006 Var names can be anything. As long as it does not start with the @ symbol.. Why? MsgBox(0, "Test", Assign("@", "")); returns 0 MsgBox(0, "Test", Assign("@test", "")); returns 0 MsgBox(0, "Test", Assign("te@st", "")); returns 1I think thats the only naming limitation. There is no built in length limit. What do Macros start with? @ComSpec etc.... SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 31, 2006 Moderators Share Posted October 31, 2006 (edited) Var names can be anything. As long as it does not start with the @ symbol.. Why? MsgBox(0, "Test", Assign("@", "")); returns 0 MsgBox(0, "Test", Assign("@test", "")); returns 0 MsgBox(0, "Test", Assign("te@st", "")); returns 1I think thats the only naming limitation. There is no built in length limit.Might want to re-check that. Edit: I should have stated. Vars must be any of the following characters: a-z A-Z 0-9 _ Edited October 31, 2006 by SmOke_N 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. Link to comment Share on other sites More sharing options...
gamerman2360 Posted October 31, 2006 Author Share Posted October 31, 2006 (edited) Vars can be null(Edit: ment to say "any character, even null", also I know this isn't what the help file states but it can be done.), but of course it has to be defined in Assign(). Are var names and macros evaluated in the same way? Would Eval("@ScriptName") return the script name or $@ScriptName? ... Nope Tests so far:MsgBox(0, "Test", Assign("@", "")); returns 0 MsgBox(0, "Test", Assign("@test", "")); returns 0 MsgBox(0, "Test", Assign("te@st", "")); returns 1 MsgBox(0, "Test", Eval("@ScriptName")); returns "" $msg = "" For $i = 0 To 255 If Not Assign(Chr($i), $i, 2) Then $msg &= $i Next MsgBox(0, "Test", $msg); Returns 64Assign(Chr($i), $i, 2) sets the vars to $i because it would hit the var used in the for loop $i and reset it :\. Edited October 31, 2006 by gamerman2360 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