wraithdu Posted February 23, 2010 Share Posted February 23, 2010 I'll post to the issue tracker when I get a chance, but I'll post the bug here now. The Linked List example does not decrement the list size in the remove method. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 23, 2010 Moderators Share Posted February 23, 2010 trancexx,Following on from wraithdu's post above, the first line of au3.UserUdfs.properties should read:au3.keywords.user.udfs=and then it follows the same structure as all the other properties files with \ as the EOL marker and a TAB at the beginning of each new line.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...
doudou Posted February 23, 2010 Share Posted February 23, 2010 Really non-trivial! You should though have mentioned somewhere that use of inline binary DLL (which is the default) requires AutoIt 3.3.4, as 3.3.2 and earlier would crash at start-up: AutoitObject.au3 (1195) : ==> String missing closing quote. UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE Link to comment Share on other sites More sharing options...
ProgAndy Posted February 23, 2010 Author Share Posted February 23, 2010 (edited) Oh, we didn't consider older AutoIt-versions Edited February 23, 2010 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
doudou Posted February 23, 2010 Share Posted February 23, 2010 Oh, we didn't consider older AutoIt-versions There are worse things Some lazy people out there just skip every 2nd version update ... and get then what they deserve: compiler errors! UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE Link to comment Share on other sites More sharing options...
trancexx Posted February 23, 2010 Share Posted February 23, 2010 There are some functions that are written for 3.3.6 or 7 or 8 Obviously they are left out. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
wraithdu Posted February 23, 2010 Share Posted February 23, 2010 I've update my previous post with better calltip\highlighting info. Link to comment Share on other sites More sharing options...
wraithdu Posted February 23, 2010 Share Posted February 23, 2010 Bah... just realized you can't use this from within any callbacks. I had this problem when I was first writing my ToggleButton UDF. If you try to call a callback from within a callback (like using SendMessage from a mouse hook to a subclassed button -> two AutoIt callbacks, or calling an AutoItObject method from a subclassed button's window procedure) then AutoIt freaks out and deadlocks. Dammit... my UDF was so much prettier and easy to use in OO. Link to comment Share on other sites More sharing options...
trancexx Posted February 23, 2010 Share Posted February 23, 2010 Bah... just realized you can't use this from within any callbacks. I had this problem when I was first writing my ToggleButton UDF. If you try to call a callback from within a callback (like using SendMessage from a mouse hook to a subclassed button -> two AutoIt callbacks, or calling an AutoItObject method from a subclassed button's window procedure) then AutoIt freaks out and deadlocks. Dammit... my UDF was so much prettier and easy to use in OO. The problem is described in the FAQ. Btw, should this work (answer on blind)? #include "AutoitObject.au3" ; First callback $hCallback1 = DllCallbackRegister("_FirstFunction", "none", "") $pCallback1 = DllCallbackGetPtr($hCallback1) ; Second callback $hCallback2 = DllCallbackRegister("_SecondFunction", "none", "") $pCallback2 = DllCallbackGetPtr($hCallback2) ;_FirstFunction() __Au3Obj_PointerCall("none", $pCallback1) Func _FirstFunction() MsgBox(64, "First", "From first function first time.") __Au3Obj_PointerCall("none", $pCallback2) MsgBox(64, "First", "From first function second time.") EndFunc Func _SecondFunction() MsgBox(64, "Second", "From second function.") EndFunc ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
wraithdu Posted February 24, 2010 Share Posted February 24, 2010 No, it shouldn't. I was going to put together a similar reproducer. Just got home... Link to comment Share on other sites More sharing options...
wraithdu Posted February 24, 2010 Share Posted February 24, 2010 (edited) But apparently it does... I guess my deadlock has to do with the callbacks blocking AutoIt's message queue, while your example (and my new test) don't have a message queue to block. So, no AIO with message processing callbacks... shame. *snip* Edited February 24, 2010 by wraithdu Link to comment Share on other sites More sharing options...
monoceres Posted February 24, 2010 Share Posted February 24, 2010 Come on! Read the FAQ Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
wraithdu Posted February 24, 2010 Share Posted February 24, 2010 (edited) I did read... and apparently forgot since yesterday. Anyway, I understand the ByRef limitation, but that doesn't mean a ptr/hwnd type should be illegal. What if I want to store a window handle or some pointer in a property? I can't do $obj.prop = GUICtrlGetHandle($id). Yes, I could do Number($ptr), but that's beside the point. Edited February 24, 2010 by wraithdu Link to comment Share on other sites More sharing options...
monoceres Posted February 24, 2010 Share Posted February 24, 2010 (edited) It's not our fault. The COM-error you're getting is thrown by autoit immediately, before control reaches AutoItObject. It seems that autoit simple doesn't have any code to handle pointers (which really is no different from integers, just different flags).Annoying to say at least.Edit: There is a ticket on the subject. Edited February 24, 2010 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
wraithdu Posted February 24, 2010 Share Posted February 24, 2010 Huh, bummer. Well, nothing to be done at the moment then. Link to comment Share on other sites More sharing options...
UberNuss Posted February 24, 2010 Share Posted February 24, 2010 Eureka! I remember discussing with DaleHolm about this sort of functionality for AutoIt. He said AutoIt would probably never have it. As a famously lesser nerd than he is, I did not argue against his prediction, but only sighed that it can never be. Top job! I wonder, would AutoItObject be useful for database construction - and what would be the pro's and con's to this use of AutoItObject ? Das Häschen benutzt Radar. Link to comment Share on other sites More sharing options...
wraithdu Posted February 24, 2010 Share Posted February 24, 2010 I found something puzzling regarding the callback deadlocks I was experiencing. For whatever reason, I can successfully call a method in my subclassed button's window procedure as long as I call it from the Switch statement for a specific message, such as the WM_LBUTTONUP case. However if I try to call the same method as the first line of the callback (before the Switch statement), then it deadlocks. That doesn't make sense to me. Calling a method from anywhere within the callack should have the same result, right? Link to comment Share on other sites More sharing options...
trancexx Posted February 24, 2010 Share Posted February 24, 2010 (edited) I found something puzzling regarding the callback deadlocks I was experiencing. For whatever reason, I can successfully call a method in my subclassed button's window procedure as long as I call it from the Switch statement for a specific message, such as the WM_LBUTTONUP case. However if I try to call the same method as the first line of the callback (before the Switch statement), then it deadlocks. That doesn't make sense to me. Calling a method from anywhere within the callack should have the same result, right? I guess only someone who knows how the callbacks are implemented in AutoIt could give you the answers you seek. How would you implement it? That code I posted above. What if I somewhere in it do something like this: $tBin = DllStructCreate("byte[96]", $pCallback1) ConsoleWrite(DllStructGetData($tBin, 1) & @CRLF) Well, I tried that and got this: 0x558BEC83EC10895DF4BA48F003038955FCBA58F003038955F88B4A0C83F900742B83C2308D5D088B421083F804740E8B03890283C3048B03894204EB048B03890249740883C30483C218EBDB8B55FC52B80809E300FFD08B5DF48BE55DC3040 I have no idea what I'm getting there For example I could assume it's something I could organize into something like this: expandcollapse popup55 8BEC 83EC10 895DF4 BA48F00303 8955FC BA58F00303 8955F8 8B4A0C 83F900 742B 83C230 8D5D08 8B4210 83F804 740E 8B03 8902 83C304 8B03 894204 EB04 8B03 8902 49 7408 83C304 83C218 EBDB 8B55FC 52 B80809E300 FFD0 8B5DF4 8BE5 5D C30400 But then again, what's that??? Maybe if I split it in some kind of logical blocks: expandcollapse popup-FIRST BLOCK- 55 8BEC 83EC10 895DF4 BA48F00303 8955FC BA58F00303 8955F8 8B4A0C 83F900 742B 83C230 8D5D08 -SECOND BLOCK- 8B4210 83F804 740E 8B03 8902 83C304 8B03 894204 EB04 -THIRD BLOCK- 8B03 8902 -FOURTH BLOCK- 49 7408 83C304 83C218 EBDB -FIFTH BLOCK- 8B55FC 52 B80809E300 FFD0 8B5DF4 8BE5 5D C30400 What if I add comments... -FIRST BLOCK- 55 push ebp 8BEC mov ebp, esp 83EC10 sub esp, 010 895DF4 mov dword[ebp-0C], ebx ... I don't know. It's above me. I don't even know what that means. Nevertheless I could, considering conditions, switch execution to another thread: expandcollapse popup#include <WinAPI.au3> #include "AutoitObject.au3" $hGui = GUICreate("") $hButtonMsgBox = GUICtrlCreateButton("Msgbox", 100, 100, 100, 30) $hButtonCall1 = GUICtrlCreateButton("Call", 100, 300, 100, 30) GUISetState(@SW_SHOW, $hGui) ; First callback $hCallback1 = DllCallbackRegister("_FirstFunction", "none", "") $pCallback1 = DllCallbackGetPtr($hCallback1) ; Second callback $hCallback2 = DllCallbackRegister("_SecondFunction", "none", "") $pCallback2 = DllCallbackGetPtr($hCallback2) Global $hThread While 1 Switch GUIGetMsg() Case -3 Exit Case $hButtonMsgBox MsgBox(64, "Title", "Text") Case $hButtonCall1 ;GUISetState(@SW_HIDE, $hGui) $hThread = _Thread_PointerCall($pCallback1) ; call, but this time in another thread ;_WinAPI_WaitForSingleObject($hThread) Beep(1200, 1200) ;GUISetState(@SW_SHOW, $hGui) EndSwitch WEnd Func _FirstFunction() MsgBox(64, "First", "From first function first time.") _SecondFunction() MsgBox(64, "First", "From first function second time.") EndFunc Func _SecondFunction() MsgBox(64, "Second", "From second function.") EndFunc Func _Thread_PointerCall($pAddress) Local $aCall = DllCall("kernel32.dll", "ptr", "CreateThread", _ "ptr", 0, _ "dword", 0, _ "ptr", $pAddress, _ "ptr", 0, _ "dword", 0, _ "dword*", 0) Return $aCall[0] EndFunc What's happening to original thread (and messages) while the another one is running? Edited February 24, 2010 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
James Posted February 25, 2010 Share Posted February 25, 2010 This is amazing! I'm re-writing some of the code I've written before to include AU3O (?) and it's been fun! It's weird using Object like code in AutoIt, but such awesomness Cheers so much for this James Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
JRowe Posted February 25, 2010 Share Posted February 25, 2010 Maybe AUOO? Got a wolf howl thing going on, there. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] 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