Orca Posted April 15, 2005 Posted April 15, 2005 Okay I'm not new to the coding scene, been doing some fun autoit apps recently. I have extensive PHP background... Now I'm working on a verification function that gets a checksum and compares it to all the values in array $checksumVal[1-n] It returns a string. Now in php I could simply set $arrayStuff['text'] = 1 and do if($arrayStuff[$stringVarFromOtherArray]==1) { stuff(); } (of course autoit syntax is a bit different) Okay now that I've thourougly explained this as poorly as I can... ... How can I set a value to a string array location instead of a decimal location $array['string'] instead of $array[4] I AM ORCA!! A VERY POWERFUL WHALE!!!
therks Posted April 15, 2005 Posted April 15, 2005 You can't. String indexes are not supported for AutoIt arrays. You could have a function that evaluates the string somehow and returns an integer, but then you're going to have a list comparing strings to numbers. My AutoIt Stuff | My Github
Orca Posted April 15, 2005 Author Posted April 15, 2005 (edited) string($int) = $string I ended up doing it a painful way... Though for users to config it.. It's uglyCan you use vars in stringsplit?$var1 = 0$var2 = 0$var3 = 1$array = stringsplit('|'&$var1&'|'&$var2&'|'&$var3&'|', '|')Something like that? Or would I need to make all the vars strings first?BTW I love your tag!On php freaks I usually just respondmanualSometimes I link to a subpage.. PHP and AutoIT have amazing manuals... Edited April 15, 2005 by SiC_Goat I AM ORCA!! A VERY POWERFUL WHALE!!!
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