BinaryBrother Posted January 27, 2014 Posted January 27, 2014 (edited) SS: http://screencast.com/t/m4OYIICM Replicator code. If _Test <> 0 Then ; EndIf Func _Test() MsgBox(16, "", "") EndFunc Console output >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\Owner\Dropbox\!Projects\!AutoIt\!Active\TeamViewer_Manager\TEMPTESTING.au3" /UserParams +>16:24:40 Starting AutoIt3Wrapper v.2.1.4.4 SciTE v.3.3.7.0 ; Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (3.3.10.2) from:C:\Program Files (x86)\AutoIt3 +>16:24:40 AU3Check ended.rc:0 >Running:(3.3.10.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\Owner\Dropbox\!Projects\!AutoIt\!Active\TeamViewer_Manager\TEMPTESTING.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop +>16:24:40 AutoIt3.exe ended.rc:0 +>16:24:40 AutoIt3Wrapper Finished.. >Exit code: 0 Time: 0.550 Notice I left out the parenthesis on "_Test()"? Shouldn't this throw a compiler or syntax error? It doesn't on my build. Thank you guys for all your time and for being patient. I know I've been asking a few annoying questions lately. Edited January 27, 2014 by BinaryBrother SIGNATURE_0X800007D NOT FOUND
trancexx Posted January 27, 2014 Posted January 27, 2014 Why do you thing there's an error? What error you expected? ♡♡♡ . eMyvnE
BinaryBrother Posted January 27, 2014 Author Posted January 27, 2014 (edited) It doesn't actually call the function. Let me give a better example. It took me a little while to find an error in my code because of this. Is this not technically bad syntax? This is why I like bringing things to chat, before posting bug reports. I could be wrong; I probably am. If _Test = 0 Then ConsoleWrite("Returned correctly.") Else ConsoleWrite(_Test2) ;Nothing EndIf Func _Test() Return 0 EndFunc Func _Test2() Return "Hello" EndFunc I am expecting a compiler error to say "Bad Syntax, you forgot parenthesis!" Edited January 27, 2014 by BinaryBrother SIGNATURE_0X800007D NOT FOUND
trancexx Posted January 27, 2014 Posted January 27, 2014 Then this code will surprise you when you run it: $vPrintFunc = ConsoleWrite $vPrintFunc("WTF!" & @CRLF) Anyway, search around the forum (and internet) for term "first class". BinaryBrother 1 ♡♡♡ . eMyvnE
BinaryBrother Posted January 27, 2014 Author Posted January 27, 2014 (edited) Oh snap! That's a very interesting development! Edit: Alright, I'm back after reading a while on it. This is some pretty interesting stuff. I'm surprised to see it was actually implemented some time ago. I think I remember reading about it before but had forgotten about it. No matter how long I stare at that example you gave me, I just can't wrap my head around it. I see a multitude of new possibilities, I think. Do you have a few practical examples that you could point out - right off the top of your head? If not, don't worry about it. I'll do some digging as time permits. Thanks for the information trancexx. As always, you have my gratitude for being informative and patient. Edited January 28, 2014 by BinaryBrother SIGNATURE_0X800007D NOT FOUND
Moderators Melba23 Posted January 28, 2014 Moderators Posted January 28, 2014 (edited) BinaryBrother, Do you have a few practical examples that you could point outLook at the code in this post - a function is assigned to the $hType variable which is then passed to a function as a parameter ($hDataType) for use within the function.M23Edit: That code has now been removed. Look at the example for _ArrayDisplay in the latest Beta which shows the same thing - a function is assigned to the $hUserFunction variable which is then passed to the function as a parameter for use within it: ; Assign the user function to a variable to pass as a parameter Local $hUserFunction = _UserFunc $aArray_2D[5][5] = "Column alignment set to right" _ArrayDisplay($aArray_2D, "Range set - right align - copy column width - user function", "3:7|4:9", 2, 15, "AA|BB|CC|DD|EE|FF", Default, Default, $hUserFunction) Edited January 28, 2014 by Melba23 Inverted 1 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
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