AutoItObject UDF
#41
Posted 23 February 2010 - 02:56 PM
The Linked List example does not decrement the list size in the remove method.
#42
Posted 23 February 2010 - 03:41 PM
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
Toast - Small GUIs which pop out of the Systray - Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command - GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI - NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure - - Notify - Small notifications on the edge of the display
RecFileListToArray - An alternative to _FileListToArray with user-defined include/exclude masks, maximum recursion level, sorting and displayed path options
GUIListViewEx - Insert, delete, move, drag and sort ListView items
#43
Posted 23 February 2010 - 04:40 PM
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.
- DDEML.au3 - DDE Client + Server
- Localization.au3- localize your scripts
- TLI.au3 - type information on COM objects (TLBINF emulation)
- TLBAutoEnum.au3 - auto-import of COM constants (enums)
- AU3Automation - export AU3 scripts via COM interfaces
- TypeLibInspector - OleView was yesterday
#44
Posted 23 February 2010 - 04:47 PM
Edited by ProgAndy, 23 February 2010 - 04:47 PM.
#45
Posted 23 February 2010 - 05:16 PM
There are worse thingsOh, we didn't consider older AutoIt-versions
Some lazy people out there just skip every 2nd version update
- DDEML.au3 - DDE Client + Server
- Localization.au3- localize your scripts
- TLI.au3 - type information on COM objects (TLBINF emulation)
- TLBAutoEnum.au3 - auto-import of COM constants (enums)
- AU3Automation - export AU3 scripts via COM interfaces
- TypeLibInspector - OleView was yesterday
#46
Posted 23 February 2010 - 05:29 PM
Obviously they are left out.
eMyvnE
#47
Posted 23 February 2010 - 06:33 PM
#48
Posted 23 February 2010 - 11:01 PM
Dammit... my UDF was so much prettier and easy to use in OO.
#49
Posted 23 February 2010 - 11:22 PM
The problem is described in the FAQ.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.
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
#50
Posted 24 February 2010 - 12:06 AM
#51
Posted 24 February 2010 - 12:11 AM
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 by wraithdu, 24 February 2010 - 12:40 AM.
#52
Posted 24 February 2010 - 12:30 AM
Is the link in my post broken? I do not longer own my domain, all the files are moved to my new domain.Example: http://monoceres.se/test.au3 -> http://andhen.mine.nu/monoceres.se/test.au3
#53
Posted 24 February 2010 - 12:42 AM
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 by wraithdu, 24 February 2010 - 12:45 AM.
#54
Posted 24 February 2010 - 12:46 AM
Annoying to say at least.
Edit: There is a ticket on the subject.
Edited by monoceres, 24 February 2010 - 12:48 AM.
Is the link in my post broken? I do not longer own my domain, all the files are moved to my new domain.Example: http://monoceres.se/test.au3 -> http://andhen.mine.nu/monoceres.se/test.au3
#55
Posted 24 February 2010 - 01:50 AM
#56
Posted 24 February 2010 - 02:19 AM
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 ?
#57
Posted 24 February 2010 - 05:31 AM
That doesn't make sense to me. Calling a method from anywhere within the callack should have the same result, right?
#58
Posted 24 February 2010 - 07:40 AM
I guess only someone who knows how the callbacks are implemented in AutoIt could give you the answers you seek.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?
How would you implement it?
That code I posted above. What if I somewhere in it do something like this:
0x558BEC83EC10895DF4BA48F003038955FCBA58F003038955F88B4A0C83F900742B83C2308D5D088B421083F804740E8B03890283C3048B03894204EB048B03890249740883C30483C218EBDB8B55FC52B80809E300FFD08B5DF48BE55DC3040
For example I could assume it's something I could organize into something like this:
But then again, what's that???
Maybe if I split it in some kind of logical blocks:
What if I add comments...
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:
#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 by trancexx, 24 February 2010 - 01:59 PM.
eMyvnE
#59
Posted 25 February 2010 - 07:15 PM
Cheers so much for this
James
#60
Posted 25 February 2010 - 09:37 PM
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
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users





