DLB Posted August 2, 2011 Share Posted August 2, 2011 Thanks in advance for any help or suggestions.History: My company is using an application now with Win7 that works perfectly with XP. The application uses external modules that do not function in Win7 and will not be updated. So, I need to write a script that will monitor the window (See Attached Image) and then let me know when either of the two (2) buttons are clicked. Since the support module is not installed the buttons will not do anything. My script will take over when the buttons are clicked.Detecting when the window is open and active is easy and works. However, I have not been able to detect when the "Eject" or "Format" buttons are clicked.Format DVD Script.au3Again, thanks for any help that you may give.David Link to comment Share on other sites More sharing options...
wakillon Posted August 2, 2011 Share Posted August 2, 2011 May be your controlID are wrong ... What's values of $EjectHandle and $FormatHandle did you get ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
DLB Posted August 3, 2011 Author Share Posted August 3, 2011 May be your controlID are wrong ...What's values of $EjectHandle and $FormatHandle did you get ? Link to comment Share on other sites More sharing options...
DLB Posted August 3, 2011 Author Share Posted August 3, 2011 May be your controlID are wrong ...What's values of $EjectHandle and $FormatHandle did you get ?Sorry, my inexperience with forums is evident.The $EjectHandle = 0x00010406The $FormatHandle = 0x00010408Somehow I figure the problem is here but don't have a clue what I am doing wrong.ThanksDavid Link to comment Share on other sites More sharing options...
KaFu Posted August 4, 2011 Share Posted August 4, 2011 My guess is that the best way would be to install a WM_COMMAND message hook for the buttons of the window once you detect that it exists. This can only be done with an external dll. Not quite a trivial code I instantly can provide . Do a search on the forum for how to hook into the message queue. Last posts this came to my attention are these from trancexx and Melba23: OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
wakillon Posted August 4, 2011 Share Posted August 4, 2011 May be It 's not working because you use a Handle instead of ControlID... GUICtrlSetOnEvent ( controlID, "function" ) AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
JohnOne Posted August 4, 2011 Share Posted August 4, 2011 If the actual app dosent even work then I suggest you just make your own GUI. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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