Bill44th Posted September 1, 2008 Share Posted September 1, 2008 (edited) I'm trying to embed my own custom button (created by autoit) into an existing program (not made by autoit). Then I want to launch some function from autoit when it is pressed. Does anyone know how to do that? I can embed the button, for instance, using: #include <GUIConstantsEx.au3> #include <GuiButton.au3> #include <WindowsConstants.au3> Run("c:\program files\mozilla firefox\firefox.exe") WinWaitActive("Mozilla","") $foxHdl = WinGetHandle("Mozilla","") $btn1 = _GUICtrlButton_Create($foxHdl, "Check1", 50, 20, 100, 50, $BS_PUSHLIKE) While 1 $msg=GUIGetMsg() Select case $msg = $btn1 MsgBox(0,0,"Test worked") case Else EndSelect WEnd Exit The button will show up, but doesn't seem to respond to me clicking it. I won't actually be embedding the button in to firefox...just using that as an example. I've tried searching the forum...but I can't find any info one my problem with the keywords I've been using. Thanks for your help! Edited September 1, 2008 by Bill44th Link to comment Share on other sites More sharing options...
rover Posted September 1, 2008 Share Posted September 1, 2008 I'm trying to embed my own custom button (created by autoit) into an existing program (not made by autoit). Then I want to launch some function from autoit when it is pressed. Does anyone know how to do that? I can embed the button, for instance, using: #include <GUIConstantsEx.au3> #include <GuiButton.au3> #include <WindowsConstants.au3> Run("c:\program files\mozilla firefox\firefox.exe") WinWaitActive("Mozilla","") $foxHdl = WinGetHandle("Mozilla","") $btn1 = _GUICtrlButton_Create($foxHdl, "Check1", 50, 20, 100, 50, $BS_PUSHLIKE) While 1 $msg=GUIGetMsg() Select case $msg = $btn1 MsgBox(0,0,"Test worked") case Else EndSelect WEnd Exit The button will show up, but doesn't seem to respond to me clicking it. I won't actually be embedding the button in to firefox...just using that as an example. I've tried searching the forum...but I can't find any info one my problem with the keywords I've been using. Thanks for your help! have a look at ANYGUI http://www.autoitscript.com/forum/index.php?showtopic=9517 seems to be no longer updated by the author 'quaizywabbit', but 'Volly' has done one update. http://www.autoitscript.com/forum/index.ph...mp;#entry515205 the UDF will need its includes updated. replace #include <guiconstants.au3> #include "guilist.au3" with #include <Constants.au3> #include <WindowsConstants.au3> #include <GuiListBox.au3> I see fascists... Link to comment Share on other sites More sharing options...
Bill44th Posted September 1, 2008 Author Share Posted September 1, 2008 have a look at ANYGUIhttp://www.autoitscript.com/forum/index.php?showtopic=9517seems to be no longer updated by the author 'quaizywabbit',but 'Volly' has done one update.http://www.autoitscript.com/forum/index.ph...mp;#entry515205the UDF will need its includes updated.replace#include <guiconstants.au3>#include "guilist.au3"with#include <Constants.au3>#include <WindowsConstants.au3>#include <GuiListBox.au3>Thanks Rover! That's just what I needed! Link to comment Share on other sites More sharing options...
rover Posted September 1, 2008 Share Posted September 1, 2008 Thanks Rover! That's just what I needed!glad to helpgood luck with it I see fascists... 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