ur Posted July 27, 2016 Posted July 27, 2016 If we give the below line in our script, we can expand the variables in double quotes to its values. AutoItSetOption ("ExpandVarStrings", 1) Like, Local $b=4 MsgBox(0,"$b$","See subject") But coming to variables, they are not getting expanded. Local $a[3]=[1,2,3] Local $b=4 _ArrayDisplay($a) MsgBox(0,"$a$$b$","See subject") Could anyone please help me on this.
jchd Posted July 27, 2016 Posted July 27, 2016 An array doesn't have a single value by defifnition so inlining isn't possible. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
ur Posted July 28, 2016 Author Posted July 28, 2016 14 hours ago, jchd said: An array doesn't have a single value by defifnition so inlining isn't possible. sorry, I mean the below case. MsgBox(0,"$a[1]$","See subject")
jchd Posted July 28, 2016 Posted July 28, 2016 Doesn't work either. Inline things are limited to flat variables and macros. But it doesn't cost much to write it "normally": MsgBox(0,"Hello " & $a[1] " showing up", "See subject") This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
SadBunny Posted July 28, 2016 Posted July 28, 2016 Small correction, you forgot the ampersand (&) after $a[1] Roses are FF0000, violets are 0000FF... All my base are belong to you.
jchd Posted July 28, 2016 Posted July 28, 2016 Yep, good catch. I can easily be bitten by writing things without the time to double-check what my f*cking keyboard sneakily decided to compose This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
ur Posted July 29, 2016 Author Posted July 29, 2016 In the current script we are having around 14 flat variables which are related, so I thought to replace them with a single array. But they are used in some strings in quotes as "$variable$", so to replace them as is I posted this question instead of appending with normal string using &. I think there is no other options to use them inline.I will go with & only. Thank you very much guys.
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