EdDyreen Posted January 19, 2010 Share Posted January 19, 2010 Dim $Array[6] = [ _ '$File_SCRIPT_Internal', _ '$FileName_SCRIPT_Internal', _ '$FileExtension_SCRIPT_Internal', _ '$File_SCRIPT_External', _ '$FileName_SCRIPT_External', _ '$FileExtension_SCRIPT_External' _ ] $NameofArray = 'Array' _ArrayDisplay ( $NameofArray ) Exit not working tried eval () tried string () can I do it with a pointer ? How does that work ? • Any number images • Images of any size • Any number of URLs • Any number of lines Link to comment Share on other sites More sharing options...
jvanegmond Posted January 19, 2010 Share Posted January 19, 2010 It works fine with eval: #include <Array.au3> Dim $Array[6] = [ _ '$File_SCRIPT_Internal', _ '$FileName_SCRIPT_Internal', _ '$FileExtension_SCRIPT_Internal', _ '$File_SCRIPT_External', _ '$FileName_SCRIPT_External', _ '$FileExtension_SCRIPT_External' _ ] $NameofArray = Eval('Array') _ArrayDisplay ( $NameofArray ) Exit github.com/jvanegmond Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 19, 2010 Moderators Share Posted January 19, 2010 EdDyreen,As Manadar has shown, you need to get the Eval function out of the way first as _ArrayDisplay MUST have a Const ByRef parameter as the array name. You can see this from the error you get when you put the Eval inside the _ArrayDisplay:ERROR: _ArrayDisplay() called with expression on Const ByRef-param(s)So you have to do the Eval bit first.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
EdDyreen Posted January 19, 2010 Author Share Posted January 19, 2010 EdDyreen, As Manadar has shown, you need to get the Eval function out of the way first as _ArrayDisplay MUST have a Const ByRef parameter as the array name. You can see this from the error you get when you put the Eval inside the _ArrayDisplay: ERROR: _ArrayDisplay() called with expression on Const ByRef-param(s) So you have to do the Eval bit first. M23 Thnx, stupid me, I was doing: _ArrayDisplay ( Eval( $NameofArray) ) but i get a different error: Dim $Array[6] = [ _ '$File_SCRIPT_Internal', _ '$FileName_SCRIPT_Internal', _ '$FileExtension_SCRIPT_Internal', _ '$File_SCRIPT_External', _ '$FileName_SCRIPT_External', _ '$FileExtension_SCRIPT_External' _ ] $NameofArray = 'Array' _ArrayDisplay ( Eval( $NameofArray) ) Exit F:\TST.au3 (205) : ==> Expected a variable in user function call.: _ArrayDisplay ( Eval( $NameofArray) ) _ArrayDisplay ( ^ ERROR Anyway it works now • Any number images • Images of any size • Any number of URLs • Any number of lines Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 19, 2010 Share Posted January 19, 2010 (edited) There was a tweak to allow values returned from nested functions to be used ByRef in other functions. This works if you click Continue on the syntax check error: #include <Array.au3> Global $sString = "ABCDEF" _ArrayDisplay(StringSplit($sString, "")) However, in Beta 3.3.3.3 and below, this didn't work with Eval(): #include <Array.au3> Global $sString = "ABCDEF" Global $aArray = StringSplit($sString, "") _ArrayDisplay(Eval("aArray")) Update to the current 3.3.4.0 Prod version and the above script also works (again, after clicking Continue on a syntax error). Getting rid of the syntax error report is an AU3Check.exe tweak, I think. Edited January 19, 2010 by PsaltyDS 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 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 19, 2010 Moderators Share Posted January 19, 2010 (edited) PsaltyDS, Another day - another little nugget of information. Not sure I will ever use it, but thanks for letting us know! M23 Edit: Speeling (or rather tpying!) Edited January 19, 2010 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
jchd Posted January 19, 2010 Share Posted January 19, 2010 @PsaltyDS: thanks for sharing. I was completely unaware of the issue as I only save my source files in UTF-8 + BOM encoding, and Au3Check doesn't know how to cook UTF files. Geez, if that breaks down in a future version, I'll have myriads of such nested calls to unroll. @Devs: Is there any assurance that such nested calls will keep on working as per 3.3.4.0? 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) Link to comment Share on other sites More sharing options...
MvGulik Posted January 20, 2010 Share Posted January 20, 2010 (edited) whatever Edited February 7, 2011 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 20, 2010 Share Posted January 20, 2010 (edited) #65 When I mentioned another tweak to AU3Check to Jos, he channeled his inner Elmer Fudd: "Shhhh! Be vewy quiet, I'm hunting pengwins! Huh-uh-uh-uh-uh-uh-uh-uh" Edited January 20, 2010 by PsaltyDS 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 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 20, 2010 Moderators Share Posted January 20, 2010 PsaltyDS,I never realised rakishly good-looking water fowl were so endangered! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
MvGulik Posted January 20, 2010 Share Posted January 20, 2010 (edited) whatever Edited February 7, 2011 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... 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