jestermgee Posted Friday at 01:20 PM Posted Friday at 01:20 PM So I have an old jukebox program I am putting into action and am experimenting with some physical controls. Most actions have keyboard shortcuts but some have only windows messages available. The help file states the following with an action as an example: Messages ======== Send the Message ID (1024 - WM_USER) to Window Class "Ultimate Jukebox Main" with the wParam values listed below. Add Selected : Message: 400 I have used AutoIT a lot for various tasks and scripts and can usually figure things out and figured this would be super easy but it does not seem to work at all for me. I am using _SendMessage() I have tried a host of different attempts such as _SendMessage("Ultimate Jukebox Main", 1024, 400) _SendMessage("[CLASS:Ultimate Jukebox Main]", 1024, 400) I've not used the _SendMessage function before and am just unsure what I am overlooking here so any simple pointer would be great.
Solution Nine Posted Friday at 01:42 PM Solution Posted Friday at 01:42 PM You need to provide a $hWnd (handle of the window) to make it work. Just use WinGetHandle to get the proper handle of your window. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
jestermgee Posted yesterday at 01:08 AM Author Posted yesterday at 01:08 AM Ah, thanks heaps for that. A simple oversight which I should have picked up on since even in the help file it shows the need to get the window handle. Trying to test waaaaay past my bedtime. For reference just in case I need to google this again in future, this now works: $hWnd = WinGetHandle('[CLASS:Ultimate Jukebox Main]') _SendMessage($hWnd, 1024, 400)
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