Locodarwin Posted August 5, 2006 Share Posted August 5, 2006 I'm eagerly awaiting callbacks. I have several uses for them, and I'm tired of having to write shims in the meantime. -S (Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent] Link to comment Share on other sites More sharing options...
piccaso Posted August 5, 2006 Author Share Posted August 5, 2006 I'm eagerly awaiting callbacks. I have several uses for them, and I'm tired of having to write shims in the meantime.for what?maybe i can add it to the examples.and whats 'shims' ? CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
piccaso Posted August 6, 2006 Author Share Posted August 6, 2006 updated again see 1'st post. btw: is there any way to trigger events inside a script without using a windows message? CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
Locodarwin Posted August 6, 2006 Share Posted August 6, 2006 Well, a good example of an API that I'd like to use callbacks in is the ActiveWorlds SDK. It would be nice to write AW "bots" in AutoIt to cut development time. In particular, the API requires you to install event handlers for specific bot functions.http://www.activeworlds.com/sdk/You're welcome to attempt the feat yourself using your FreeBasic code. It doesn't solve the problem for me because I've already created a shim for it, and your code is really just another shim of sorts. If AutoIt, however, had inborn callback functionality, I wouldn't have to include any shims. That's what I'm looking for, ultimately.By the way, loosely interpreted, a "shim" in programming parlance (particularly an API shim) is a library that converts one API into another. In the sense we're using here, a shim is code stuck between two APIs to bridge communication between them. (Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent] Link to comment Share on other sites More sharing options...
sohfeyr Posted September 2, 2006 Share Posted September 2, 2006 I tryed to write a dll that enables autoit to do callback's...Updated: 06.08.06Other windows messages can be used toCommented Example "EnumWindows"function headers with DllCall Syntax in dll sourceThis looks really useful! Have you done any more with it? Further documentation, examples, etc? Mine:Time Functions - Manipulate the system clock! | WinControlList (WinGetClassList++) | .Net Setup Wrapper, Detect or install .Net | Writing and using a VB .NET COM object in AutoItNot mine, but highly recommended:AutoItTreeViewExtension plugin | Menu code | Callback helper dll | Auto3Lib - Control the uncontrollable | Creating COM objects in AutoIt | Using .Net framework classes in AutoIt Link to comment Share on other sites More sharing options...
piccaso Posted September 3, 2006 Author Share Posted September 3, 2006 well thats all for now i still didnt get it to work with 64bit patameter so i'm still learing asm to do this... if you want to do something specific i could fix you up an example. CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
ihope Posted October 17, 2006 Share Posted October 17, 2006 (edited) in real geek man you opened some hell door thanx alot Edited October 17, 2006 by ihope Link to comment Share on other sites More sharing options...
masvil Posted December 27, 2006 Share Posted December 27, 2006 Didnt test this with Shutdown only Logoff but... This can be done without callback: $WM_QUERYENDSESSION = 0x11 $WM_ENDSESSION = 0x16 $hWndDummy = GUICreate("") $fTrigger = False GUIRegisterMsg($WM_QUERYENDSESSION,"_Msg") Func _Msg($hWndGUI, $MsgID, $WParam, $LParam) $fTrigger = True Return False EndFunc While 1 If $fTrigger Then $fTrigger = False MsgBox(0,"Shutdown","No you dont!") EndIf Sleep(250) WEnd You code works good, but... shutdown hangs How can I let shutdown go after doing something (MsgBox in our example)? Link to comment Share on other sites More sharing options...
Skrip Posted December 27, 2006 Share Posted December 27, 2006 $FTrigger = True [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
amel27 Posted May 7, 2007 Share Posted May 7, 2007 (edited) I tryed to write a dll that enables autoit to do callback'sThx for solution, but I'v some problems - AutoIT crashes during Shell API CallBack functions call... This problem fixing by tow steps: declaring MyCallBack function as STDCALL (instead of CDECL) and decreasing count of parameters to actual... Any ideas?.. May be in addition compile separate function for every count of parameters?.. For example: CallBack01, CallBack02, etc... Edited May 7, 2007 by amel27 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