Jump to content

Send Message ID to Application


Go to solution Solved by Nine,

Recommended Posts

Posted

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
Posted

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)


 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...