confuseman Posted July 14, 2006 Share Posted July 14, 2006 Hi, newbie to AutoIt. any idea how to expand variable in string for a single array item. Here is the code Opt("ExpandVarStrings",1) Dim $isA[2]$isA[0] = "France" $isA[1] = "Italy" Msgbox(0,"Test", "$isA[0]$ vs $isA[1]$") ; Never work I try to avoid using &, is that possible. Any solution? Link to comment Share on other sites More sharing options...
evilertoaster Posted July 14, 2006 Share Posted July 14, 2006 (edited) as far as i know you must use '&' Dim $isA[2] $isA[0] = "France" $isA[1] = "Italy" Msgbox(0,"Test", $isA[0]&" vs "&$isA[1])oÝ÷ ØZ½éÞ½êìyéè¯ +çpØZÁ¬¢)íz¸+j×½ªâi¹^{hjËkx%G«Dv+@Øhºb*.ßÚÞæ¥& j)ì·Zý~ì¢g«y«(*.r¥uÚ,¶b殶sd÷BgV÷C´WæEf%7G&æw2gV÷C²Ã ¤FÒb33c¶4³%Ð ¢b33c¶4³ÒÒgV÷C´g&æ6RgV÷C°¢b33c¶4³ÒÒgV÷C´FÇgV÷C°¢b33cµFV×Òb33c¶4³Ð¢b33cµFV×#Òb33c¶4³Ð¤×6v&÷ÂgV÷CµFW7BgV÷C²ÂgV÷C²b33cµFV×b33c²g2b33cµFV×"b33c²gV÷C² Edited July 14, 2006 by evilertoaster Link to comment Share on other sites More sharing options...
confuseman Posted July 14, 2006 Author Share Posted July 14, 2006 Ok thanks. If array not possible in expansion string than I think your method is acceptable. The reason I want to use array in expansion variable string is because is more tidy code and can reduce line of code used. Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 14, 2006 Share Posted July 14, 2006 Hi, what about Dim $isA[3] = ['',"France", "Italy"] Msgbox(0,"Test", $isA[1] & " " & $isA[2]) So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
confuseman Posted July 14, 2006 Author Share Posted July 14, 2006 Hi Mega, Emm... still got "&" that I want to avoid. But anyway I like your first line. 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