MilesAhead Posted October 10, 2008 Share Posted October 10, 2008 (edited) I think I know what's happening but I've been wrong before so... What I'm running into is I have an ActiveX Control that I wrote that puts up standard Windows Message Dialogs but with some custom background painting routines. The issue is if you add a Help Button to the dialog by assigning a help context of other than -1, when it's pressed, the event isn't processed in AutoIt3 until the dialog is dismissed. The event handler works as expected in VC++, VB, Delphi so I'm thinking perhaps the issue is that even though the AutoIt3 script is compiled, it's still being executed a line at a time. I'll post the AutoIt3 script and perhaps someone can verify my suspicion. ;simple example usage of GradDlgX ActiveX Control ; $grad = ObjCreate("GradDlgXControl1.GradDlgX") $sinkObject = ObjEvent($grad, "DoHelpEvent_","IGradDlgXEvents") $grad.GradStyle = 1; use 0 for metalic gradient look If $grad.ConfirmDlg("Sure you want to do this?", True, 1, 5) = 1 Then $grad.InfoDlg("You Pressed OK", True, 0, -1) EndIf $sinkObject = 0 $grad = 0 ;help event when you press Help button in GradDlg. ;works in compiled languages(Delphi, VC++, VB, even C#) but in AutoIt3 the event ;only fires after the modal dialog is closed(i.e. OK or Cancelis pressed) Func DoHelpEvent_OnContextHelp($HelpCtx) MsgBox(0x40000, "Grad Test Help", "This is some Help for Help Context " _ & String($HelpCtx)) EndFunc;==>DoHelpEvent_OnContextHelp Edited October 10, 2008 by MilesAhead My Freeware Page Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 10, 2008 Share Posted October 10, 2008 I'm pretty sure since Autoit is a scritping language and interpreted it will be read a line at a time. I can't quite say for 100% but most scripting languages I know of behave this way. The exe file isn't really a binary exe like one would expect if I remember. It's nothing but the script and a real binary file (the interpreter) in one file. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
MilesAhead Posted October 11, 2008 Author Share Posted October 11, 2008 Thanks for the reply. That's what I thought. I'm still trying to figure out where to declare and create an event sink in Python so I could try it out for the same behavior there. My Freeware Page Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 11, 2008 Share Posted October 11, 2008 Well I don't know anything about python so I can't help you there. Glad I could at least help confirm your suspicions. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] 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