Hello all! First post, so please be gentle ;) :-P
I’m at work right now, I’ll post a picture of my patch later, but basically I’m having a problem where I’m trying to use the SendMessage patch to send WM_KEYDOWN and WM_KEYUP messages to a game I’d like to remote control. My FTIR table is working pretty well, and I’ve got the contour detection and everything set up. Everything goes well, until it tries to use SendMessage to send to LiquidWars (the game / program I’m trying to simulate keystrokes in).
Watching the messages that LiquidWars is receiving, WM_KEYDOWN has absolutely no problems. (The message is 256, wParam is 37 thru 40 depending on the arrow key, and lParam is below 268435455 (0x0FFFFFFF)). I specifically mention the lParam because when trying to send the WM_KEYUP message, in which the message is 257, wParam 37-40, lParam is at least 3221225472 (0xC0000000)… Spy++ reports LiquidWars as receiving an lParam of 0x80000000.
I’m sorry if that’s a bit convoluted, but it’s the best way I could figure to express my problem.
A friend at work suggested that it’s because the higher bits of the lParam are reserved for the OS; this doesn’t make sense to me, because then I wouldn’t be able to simulate the correct message, ever. I think it might be because vvvv stores 8 bytes as positive or negative, so instead of going from 0x0 - 0xFFFFFFFF, it goes from … say, -0x7FFFFFFF to 0x80000000.
Any ideas on this? I don’t want to have to create an external program (yet) just to send that one message to LiquidWars. Please let me know, and thanks very much in advance! vvvv rules!