Lucid Posted April 28, 2014 Posted April 28, 2014 Everyone on the forum has been really helpful here in the past, and so I thought I'd try tossing out another question for some direction (I'm still new at AutoIT, but learning!). I've got a GUI that does a bunch of stuff, and in it, I've got an image file I'm using as a CANCEL button. Now, what I am trying to do is figure out how I can have my GUI run a bunch of tasks, but give the user an option to click CANCEL and abort the remaining tasks. I have everything working just fine, except the user can't abort the operation once they've initiated it. How can I have something monitor my CANCEL button/control/label/GUI and detect when it's been pressed? I know I can use some built-in methods if it were an official button control, but I'm using GDI and parent/child GUIs to do some fancy visual stuff. Here's a snippet of how I generate the CANCEL button on my controls GUI: $hControlGUI = GUICreate("Button_ControlGUI", $iWidth, $iHeight, $iButtonX, $iButtonY, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $hGUI) $hButton = GUICtrlCreateLabel("CANCEL", 0, 0, $iWidth, $iHeight) SetBitmap($hControlGUI, $hButtonImage, $iOpacity) Thanks in advance for any pointers in a direction to research!
JohnOne Posted April 29, 2014 Posted April 29, 2014 Just treat the pic control as though it were a button. Posting code that is runnable by other members is always a good idea. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Solution Lucid Posted May 1, 2014 Author Solution Posted May 1, 2014 Thanks anyway, I got it figured out by using AdlibRegister
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