Solved

SIMPLE Send Keys Question

Posted on 1998-07-18
30
363 Views
Last Modified: 2013-12-03
I'm programming in straight C, and I need a way to post to a message queue that Ctrl-i has been pressed.  I've tried using PostMessage, and SendMessage, with the WM_KEYDOWN message, but to no avail.  I'm posting it to an app OTHER than my own, and I am making sure that I have the correct HWND that I am sending it to...
0
Comment
Question by:BudVVeezer
  • 12
  • 10
  • 7
  • +1
30 Comments
 
LVL 11

Expert Comment

by:alexo
ID: 1410574
PostMessage(hwnd, WM_CHAR, 9, MAKELPARAM(1, 0x17));

Have fun!
0
 
LVL 11

Expert Comment

by:alexo
ID: 1410575
Explanation:
  Sends a character with code 9 (TAB or CTRL-i), scan-code 0x17 and repeat count 1.

Tried it with a notepad window.  It sent a TAB character.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1410576
That will porably work in almost every case, but I recomend using keybd_event() for a little more safety.  keybd_event will send all the messages associated with a key press and update the internal windows data structures related to a key press so in some cases it may be better behaved than sending the WM_CHAR message directly.(It should result in the message being sent.)

You would use:
keybd_event(VK_TAB,0x17,0,0);  // Press the key.
keybd_event(VK_TAB,0x17,KEYEVENTF_KEYUP,0);  // Release the key.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1410577
That was supposed to be "probably work".
0
 
LVL 11

Expert Comment

by:alexo
ID: 1410578
keybd_event() has one small drawback - it passes a synthesized keystroke to the keyboard device driver, which passes it to the system message ques which posts it to the message queue of the window that currently has the input focus.  So, you have to SetForegroundWindow() if you want the key to reach its destination but MS, in their infinite wisdom, broke^H^H^H^H^Hchanged the working of SetForegroundWindow() in Win98.  Typical, eh?
0
 
LVL 22

Expert Comment

by:nietod
ID: 1410579
Good point.  I was actually thinking that that was one of the advantages to keybd_event()--that is, it  would send the key to the "right" window.  But that's not an advantage when the right window is the wrong one.  

What did they change with SetForegroundWindow()?  Did they make it so one thread can't do it to another?

0
 
LVL 3

Author Comment

by:BudVVeezer
ID: 1410580
Well, I tried both of your solutions, but to no avail.  It DOES work with notepad.  But it's NOT working with the program I'm trying to send the message to.  Now, I'm using SPY++ to locate this program and find the windows for it, but it does not seem to want to work.  I'm trying to send the message to AOL.  Does it matter that I am trying to use a hotkey in AOL to activate a menu choise?  I was thinking of trying WM_COMMAND, but I didn't know the menu item number.  I've also tried finding the button, using spy++, then sending a WM_LBUTTONDOWN message, using the button's coordinates.  I'm kinda grasping at straws here.  Any thoughts as to WHY this won't work?  I was thinking I might be posting the message to the wrong queue, but I've posted it to EVERYTHING that even mentions AOL in it(in spy++)...
0
 
LVL 11

Expert Comment

by:alexo
ID: 1410581
>> Did they make it so one thread can't do it to another?
Something like it.  In Win98 the icon on the taskbar will flash instead.  You can override it on a per-app basis using an obscure key in the registry which will probably change in the next version.

Search DejaNews for SetForegroundWindow posts by Raymond Chen.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1410582
The problem here (that one I was trying to avoid, but would have often introduced another) is that the menu is not activated by the WM_CHAR message.  It is the WM_KEYDOWN and WM_KEYUP messages.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1410583
However, I would think your best bet is to use SPY++ to observe the command produced by the menu option and to send that command.  (The important part is to get the WPARAM for the command.)  What do you think alex?
0
 
LVL 2

Expert Comment

by:duneram
ID: 1410584
Hi,

First some comments.  In the newer windows, SetForegroundWindow has a dual purpose of letting Windows know, that the SFW window is the one that receives input from the Raw Input Thread.

When you use SFW there is an actual period of time under which
1) the current SFW window is made non foregrund
2) No window has the Foreground Window Status
3) Finally your window has the foreground status.

Each of those three events happen sequentially.  So if you are including a call to SFW in your algorithm you also need to add a loop that waits until GFW returns the same HWND value that you gave in SFW.

Next, in terms of using SendKeys.  I would go with Jeffrey Richter's Sendkeys algorithm.  His algorithm uses a Journal Playback Proc hook to pass messages to the other application.  I have worked extensively with that algorithm, and even extended it to make it much more useful.

His algorithm essentially converts your request into windows messages and then sends them off to whatever window has the Raw Input Thread.  (In 16 bits it doesn't matter, you can send to a non SFW window).

In Spy, you can determine the menu command value of a particular command you are doing, and it sounds like you may already know that, but if you didn't that is an alternative way to go about a solution set.

But there is one more thing you could do.  Determine the name/location of the function that is called when you press control I (softice could aid in that endeavor).  If you were to install a window message hook proc on the AOL window, then you could add special handler designed to respond to the 'control I' and then have your special handler call the function in question.

Now in regards to win98 and SFW behavior.  There is a bit of undocumented stuff you could do, but it would take some study to make it work right.  I haven't done it in 98, but I did do it in 95 for a different problem and it worked very well.

Install a system wide messagehook proc.   Before you send your keys, make the other app FW using SFW.   then send your keys.
 In your hook proc, when ever a WM_WINDOWPOSCHANGING message  comes thru and a WM_WINDOWPOSCHANGED message, you would alter their contents, before passing them on their way.

yOU WOULd have to tweak them a bit, but I am sure you can restore the 95 functionality...

0
 
LVL 11

Expert Comment

by:alexo
ID: 1410585
Aaron, why didn't you say so in the first place?
By all means, send a WM_COMMAND.  Getting the command ID should be easy: either using Spy or (my favorite) opening the executable in the resource editor and checking the actual IDs of the menus and accelerators.  Just drag&drop the executable into MSVC.

For example, looking at the Windows CALC.EXE I see it defines the following resources:

SM MENU FIXED IMPURE
BEGIN
    POPUP "&Edit"
    BEGIN
        MENUITEM "&Copy\tCtrl+C",               300
        MENUITEM "&Paste\tCtrl+V",              301
    END
    POPUP "&View"
    BEGIN
        MENUITEM "&Scientific",                 305
        MENUITEM "S&tandard",                   306
    END
    POPUP "&Help"
    BEGIN
        MENUITEM "&Help Topics ",               65532
        MENUITEM SEPARATOR
        MENUITEM "&About Calculator",           303
    END
END

4 MENU FIXED IMPURE
BEGIN
    POPUP ""
    BEGIN
        MENUITEM "&What's This?",               8
    END
END

SA ACCELERATORS FIXED IMPURE
BEGIN
    "A",            65,                     VIRTKEY
    "B",            66,                     VIRTKEY
    "C",            67,                     VIRTKEY
// many lines deleted...
    VK_INSERT,      120,                    VIRTKEY
    "^C",           300,                    ASCII  
    "^V",           301,                    ASCII  
    VK_INSERT,      300,                    VIRTKEY, CONTROL
    VK_INSERT,      301,                    VIRTKEY, SHIFT
END

0
 
LVL 11

Expert Comment

by:alexo
ID: 1410586
However, my experience shows that sending WM_COMMANDs does not always work in a straightforward way.  For example, one app that I "automated" using this method didn't process the WM_COMMANDs correctly unless I moved it to the foreground.  Your mileage may vary.
0
 
LVL 3

Author Comment

by:BudVVeezer
ID: 1410587
Not to not give credit where credit is due.....I like your answer, and it DOES work, BUT, there's a slight problem.  I used the MSDev AND spy++, still to no avail.  The MSDev does way does NOT show me the correct menus.  I have the feeling that the menus for AOL are NOT in resource form, but made on the fly.  Spy++ tells me all the right things, but not where to post the message.  I must admit, I'm NOT even close to being learned in spy++.  Here's the code that I have to post the message, please do tell me if there's something wrong with it.

if(AOL=FindWindow("AOL Frame 25, NULL))
{
PostMessage(AOL, WM_KEYDOWN, (WPARAM)11, (LPARAM)0x001D0001);
                              PostMessage(AOL, WM_KEYDOWN, (WPARAM)49, (LPARAM)0x00170001);
                              PostMessage(AOL, WM_KEYUP, (WPARAM)49, (LPARAM)0xC0170001);
                              PostMessage(AOL, WM_KEYUP, (WPARAM)11, (LPARAM)0xC01D0001);
}

Thanks for the help, I'll give ya points alexo, if ya can keep helping a dog learn new tricks.  =oP  

~Aaron
0
 
LVL 11

Expert Comment

by:alexo
ID: 1410588
>> I'll give ya points alexo, if ya can keep helping a dog learn new tricks
I'm trying but my knowledge and resources are finite...

Is there any reason you reject the answers so quickly?  You do know that we can continue the discussion without accepting or rejecting it until you are either satisfied or milk me for all I'm worth.

Don't you thing the amount of knowledge you got from this discussion is worth the 20 points you oferred?  Remember that an "easy" question is 50 points so 20 must be, what, trivial?

First suggestion:  Try to get WM_COMMAND arguments using Spy.

Second suggestion: SetForegroundWindow() and keybd_event().  However, that has the drawback I outlined above as well as not working when a password-protected screen saver is active (on NT for sure, on 95 maybe).

There are two utilities that remotely control the Agent newsreader.  One sends keystrokes and the other sends WM_COMMANDs.  I think you get the sources too.  Take a look at them for educational purposes:
    http://www.skuz.net/madhat/dl/Agenttsk.zip
    http://www.skuz.net/madhat/dl/ATsk-0dx.zip

0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 3

Author Comment

by:BudVVeezer
ID: 1410589
First off, for the points, I happen to be LOW(understatement), but I'll give ya all I have because you have been working your butt off on this one.  Second off, you have the points(in my mind), and I wouldn't give anyone else the points if they tried to sneak in an answer.  I didn't know we could keep the discussion going after the points are given.  Pop in an answer, and the points are yours.

I tried using Spy++ for the WM_COMMAND message, and I got a weird result.  I GOT all the info I need from it, and when I send it, it causes an error in AOL which pops up a message box.  But when I send the message using NORMAL menus(as opposed to the iconated menus which I am working with), it works FINE.  ???  This is a stumper to me.
0
 
LVL 11

Accepted Solution

by:
alexo earned 60 total points
ID: 1410590
>> I didn't know we could keep the discussion going after the points are given.
The EE interface can be confusing at times.

>> Pop in an answer, and the points are yours.
OK.

>> This is a stumper to me.
Some more info can help.  let's have it all! (including the Spy data).
0
 
LVL 22

Expert Comment

by:nietod
ID: 1410591
I would like to know what command you are trying to run this way (i.e. what does the menu option do) also are you saying that the window is iconic when you send the command message to it?  (That could be a problem in some cases.)
0
 
LVL 3

Author Comment

by:BudVVeezer
ID: 1410592
Well, the menu is in the form of an icon, that when you click on it, it drops down like a menu.  It comes up in spy++ as being "_AOL_Icon" when I use the window finder.  Whether this means it's iconic or not, no clue here.  Now, the info that it sends is this:

WM_COMMAND  wNotifyCode: 0 (Sent from menu) wID: 7172

Now, the odd thing about this is: I used spy++ on OTHER "menus", like this first one, and some of the popped up the same wID, and other popped up a different one.  When I use ANY of these "icon menus", I get an AOL error(NOT a fatal error, but an AOL-produced message box).  But when I use the regular menus, it works fine.  I dunno what other info you need for this, but if ya want to know something, just ask it, and I'll do my best to find out for you. Thanks to all who are trying to help me with this "SIMPLE" problem!  I thought it was the type where I'd smack myself for not thinking of the answer myself-thus the label.  Sorry for the lack of points on the question also alexo.  If I had more, I'd bump it up more, but as of right now, I have no points left.  =(  You have all I had.  Hope you can still help me!

~Aaron
0
 
LVL 11

Expert Comment

by:alexo
ID: 1410593
You can post the Spy log of the messages that are sent.  Please filter out mouse movement, non-client and other "noise" messages.

Why are you involved with AOL?
0
 
LVL 3

Author Comment

by:BudVVeezer
ID: 1410594
This is it for when I use the hot keys method.

00000B94 S WM_WINDOWPOSCHANGING lpwp:0066F610
00000B94 R WM_WINDOWPOSCHANGING
00000B94 S .WM_GETTEXT cchTextMax:255 lpszText:0066F28C
00000B94 R .WM_GETTEXT cchCopied:15 lpszText:0066F28C ("America  Online")
00000B94 S WM_ERASEBKGND hdc:00000712
00000B94 R WM_ERASEBKGND fErased:True
00000B94 S WM_WINDOWPOSCHANGED lpwp:0066F650
00000B94 R WM_WINDOWPOSCHANGED
00000B94 S WM_ACTIVATEAPP fActive:True dwThreadID:00000000
00000B94 R WM_ACTIVATEAPP
00000B94 S WM_ACTIVATE fActive:WA_CLICKACTIVE fMinimized:False hwnd:(null)
00000B94 S .WM_SETFOCUS hwndLoseFocus:(null)
00000B94 S ..WM_KILLFOCUS hwndGetFocus:00000B98
00000B94 R ..WM_KILLFOCUS
00000B94 R .WM_SETFOCUS
00000B94 R WM_ACTIVATE
00000B94 P WM_PAINT hdc:00000000
00000B94 S .WM_GETTEXT cchTextMax:255 lpszText:0066F394
00000B94 R .WM_GETTEXT cchCopied:15 lpszText:0066F394 ("America  Online")
00000B94 S WM_ACTIVATE fActive:WA_INACTIVE fMinimized:False hwnd:(null)
00000B94 R WM_ACTIVATE
00000B94 S WM_ACTIVATEAPP fActive:False dwThreadID:FFFFBECB
00000B94 R WM_ACTIVATEAPP

~Aaron
0
 
LVL 3

Author Comment

by:BudVVeezer
ID: 1410595
This is it for the "menu" method

00000B94 S WM_WINDOWPOSCHANGING lpwp:0066F45E
00000B94 R WM_WINDOWPOSCHANGING
00000B94 S .WM_GETTEXT cchTextMax:255 lpszText:0066F0DC
00000B94 R .WM_GETTEXT cchCopied:15 lpszText:0066F0DC ("America  Online")
00000B94 S WM_ERASEBKGND hdc:00000712
00000B94 R WM_ERASEBKGND fErased:True
00000B94 S WM_WINDOWPOSCHANGED lpwp:0066F49E
00000B94 R WM_WINDOWPOSCHANGED
00000B94 S WM_ACTIVATEAPP fActive:True dwThreadID:00000000
00000B94 R WM_ACTIVATEAPP
00000B94 S WM_ACTIVATE fActive:WA_CLICKACTIVE fMinimized:False hwnd:(null)
00000B94 S .WM_SETFOCUS hwndLoseFocus:(null)
00000B94 S ..WM_KILLFOCUS hwndGetFocus:00000B98
00000B94 R ..WM_KILLFOCUS
00000B94 R .WM_SETFOCUS
00000B94 R WM_ACTIVATE
00000B94 P WM_PAINT hdc:00000000
00000B94 S WM_ENTERMENULOOP fIsTrackPopupMenu:True
00000B94 R WM_ENTERMENULOOP
00000B94 S WM_INITMENU hmenuInit:000000A4
00000B94 R WM_INITMENU
00000B94 S WM_INITMENUPOPUP hmenuPopup:000000A4 uPos:0 fSystemMenu:False
00000B94 R WM_INITMENUPOPUP
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S .WM_MENUSELECT uItem:7169 fuFlags:MF_HILITE | MF_MOUSESELECT hmenu:000000A4
00000B94 R .WM_MENUSELECT
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S .WM_MENUSELECT uItem:7170 fuFlags:MF_GRAYED | MF_DISABLED | MF_MOUSESELECT | 0800 hmenu:000000A4
00000B94 R .WM_MENUSELECT
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S .WM_MENUSELECT uItem:7171 fuFlags:MF_HILITE | MF_MOUSESELECT hmenu:000000A4
00000B94 R .WM_MENUSELECT
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S .WM_MENUSELECT uItem:7172 fuFlags:MF_HILITE | MF_MOUSESELECT hmenu:000000A4
00000B94 R .WM_MENUSELECT
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:(null)
00000B94 R WM_ENTERIDLE
00000B94 S .WM_CAPTURECHANGED hwndNewCapture:00000000
00000B94 R .WM_CAPTURECHANGED
00000B94 S .WM_MENUSELECT uItem:0 fuFlags:FFFF (menu was closed) hmenu:00000000
00000B94 R .WM_MENUSELECT
00000B94 S .WM_EXITMENULOOP fIsTrackPopupMenu:True
00000B94 R .WM_EXITMENULOOP
00000B94 P WM_COMMAND wNotifyCode:0 (sent from a menu) wID:7172
00000B94 S ...WM_WINDOWPOSCHANGING lpwp:0066D9EA
00000B94 R ...WM_WINDOWPOSCHANGING
00000B94 S ....WM_GETTEXT cchTextMax:255 lpszText:0066D668
00000B94 R ....WM_GETTEXT cchCopied:15 lpszText:0066D668 ("America  Online")
00000B94 S ...WM_ERASEBKGND hdc:00000712
00000B94 R ...WM_ERASEBKGND fErased:True
00000B94 S ...WM_WINDOWPOSCHANGED lpwp:0066DA2A
00000B94 R ...WM_WINDOWPOSCHANGED
00000B94 S .WM_GETTEXT cchTextMax:255 lpszText:0066F394
00000B94 R .WM_GETTEXT cchCopied:15 lpszText:0066F394 ("America  Online")
00000B94 S WM_ACTIVATE fActive:WA_INACTIVE fMinimized:False hwnd:(null)
00000B94 R WM_ACTIVATE
00000B94 S WM_ACTIVATEAPP fActive:False dwThreadID:FFFFBECB
00000B94 R WM_ACTIVATEAPP

~Aaron
0
 
LVL 11

Expert Comment

by:alexo
ID: 1410596
>> This is it for when I use the hot keys method [...]
Those are all "noise" messages.  Remove them from Spy monitoring and try to monitor all windows in the application (obviously, a different window gets the hotkey!)

>> This is it for the "menu" method [...]
WM_ENTERIDLE is noise.  Remove it from the list.
Maybe the AOL client checks WM_MENUSELECT messages?
0
 
LVL 3

Author Comment

by:BudVVeezer
ID: 1410597
here is the menu selection

0000085C S .....WM_COMMAND wNotifyCode:0100 wID:0 hwndCtl:00000864
0000085C R .....WM_COMMAND
0000085C S .WM_COMMAND wNotifyCode:0200 wID:0 hwndCtl:00000864
0000085C R .WM_COMMAND
000001A4 S WM_ENTERMENULOOP fIsTrackPopupMenu:True
000001A4 R WM_ENTERMENULOOP
000001A4 S .WM_MENUSELECT uItem:7169 fuFlags:MF_HILITE | MF_MOUSESELECT hmenu:00000584
000001A4 R .WM_MENUSELECT
000001A4 S .WM_MENUSELECT uItem:7170 fuFlags:MF_GRAYED | MF_DISABLED | MF_MOUSESELECT | 0800 hmenu:00000584
000001A4 R .WM_MENUSELECT
000001A4 S .WM_MENUSELECT uItem:7171 fuFlags:MF_HILITE | MF_MOUSESELECT hmenu:00000584
000001A4 R .WM_MENUSELECT
000001A4 S .WM_MENUSELECT uItem:7172 fuFlags:MF_HILITE | MF_MOUSESELECT hmenu:00000584
000001A4 R .WM_MENUSELECT
000001A4 S .WM_MENUSELECT uItem:0 fuFlags:FFFF (menu was closed) hmenu:00000000
000001A4 R .WM_MENUSELECT
000001A4 S .WM_EXITMENULOOP fIsTrackPopupMenu:True
000001A4 R .WM_EXITMENULOOP
000001A4 P WM_COMMAND wNotifyCode:0 (sent from a menu) wID:7172
00000AFC S .WM_COMMAND wNotifyCode:0100 wID:0 hwndCtl:00000B04
00000AFC R .WM_COMMAND
00000AFC S .WM_COMMAND wNotifyCode:0300 wID:0 hwndCtl:00000B58
00000AFC R .WM_COMMAND
00000AFC S .WM_COMMAND wNotifyCode:0300 wID:0 hwndCtl:00000B58
00000AFC R .WM_COMMAND
00000AFC S .WM_COMMAND wNotifyCode:0300 wID:0 hwndCtl:00000B58
00000AFC R .WM_COMMAND
00000AFC S .WM_COMMAND wNotifyCode:0300 wID:0 hwndCtl:00000B58
00000AFC R .WM_COMMAND
00000AFC S .WM_COMMAND wNotifyCode:0300 wID:0 hwndCtl:00000B58
00000AFC R .WM_COMMAND
00000AFC S .WM_COMMAND wNotifyCode:0200 wID:0 hwndCtl:00000B04
00000AFC R .WM_COMMAND


0
 
LVL 3

Author Comment

by:BudVVeezer
ID: 1410598
Here is the hot key(Why is it there are a BUNCH of KEYDOWNs ?  I only held it down for a split second.  I know it counts ticks fast, but I've never had it go this far before)

00000BA0 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:0 fUp:0
00000610 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:0 fUp:0
00000BA0 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000610 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000BA0 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000610 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000BA0 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000610 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000BA0 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000610 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000BA0 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000610 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000BA0 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000610 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000BA0 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000610 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000BA0 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000610 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000BA0 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000610 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000BA0 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000610 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:0
00000BA0 P WM_KEYDOWN nVirtKey:'M' cRepeat:1 ScanCode:32 fExtended:0 fAltDown:0 fRepeat:0 fUp:0
00000BA0 P WM_CHAR chCharCode:'' (13) cRepeat:1 ScanCode:32 fExtended:0 fAltDown:0 fRepeat:0 fUp:0
00000610 P WM_KEYDOWN nVirtKey:'M' cRepeat:1 ScanCode:32 fExtended:0 fAltDown:0 fRepeat:0 fUp:0
00000610 P WM_CHAR chCharCode:'' (13) cRepeat:1 ScanCode:32 fExtended:0 fAltDown:0 fRepeat:0 fUp:0
00000CD0 S .WM_COMMAND wNotifyCode:0100 wID:0 hwndCtl:00000CD8
00000CD0 R .WM_COMMAND
00000CD0 S .WM_COMMAND wNotifyCode:0300 wID:0 hwndCtl:00000D2C
00000CD0 R .WM_COMMAND
00000CD0 S .WM_COMMAND wNotifyCode:0300 wID:0 hwndCtl:00000D2C
00000CD0 R .WM_COMMAND
00000CD0 S .WM_COMMAND wNotifyCode:0300 wID:0 hwndCtl:00000D2C
00000CD0 R .WM_COMMAND
00000CD0 S .WM_COMMAND wNotifyCode:0300 wID:0 hwndCtl:00000D2C
00000CD0 R .WM_COMMAND
00000CD0 S .WM_COMMAND wNotifyCode:0300 wID:0 hwndCtl:00000D2C
00000CD0 R .WM_COMMAND
00000CD8 P WM_KEYUP nVirtKey:'M' cRepeat:1 ScanCode:32 fExtended:0 fAltDown:0 fRepeat:1 fUp:1
00000CD8 P WM_KEYUP nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:1
00000CD0 S .WM_COMMAND wNotifyCode:0200 wID:0 hwndCtl:00000CD8
00000CD0 R .WM_COMMAND

0
 
LVL 11

Expert Comment

by:alexo
ID: 1410599
>> WM_COMMAND wNotifyCode:0100 wID:0 hwndCtl:00000CD8
>> WM_COMMAND wNotifyCode:0300 wID:0 hwndCtl:00000D2C

Try simulating those.
0
 
LVL 3

Author Comment

by:BudVVeezer
ID: 1410600
I tried simulating just those messages, and it didn't work, and I tried simulating the WM_COMMAND, wID: 7172 WITH those messages after it, and it caused the same AOL error as before...

~Aaron
0
 
LVL 11

Expert Comment

by:alexo
ID: 1410601
I'm beginning to run out of ideas...
How about the keybd_event() approach.  Have you tried it?
0
 
LVL 22

Expert Comment

by:nietod
ID: 1410602
Some software this just isn't going to work for.  For example, My programs use a very object oriented approach to menus.  You would not be able to fake them into envoking a menu command in this way.  (Off course you don't need to because I've provided mechanisms for doing so.)
0
 
LVL 3

Author Comment

by:BudVVeezer
ID: 1410603
Hmm......I'm beginning to wonder.....I dunno if this will ever work.  I can just keep trying on my own.  Thanks to all for your help in this!  I apprecaite your patience with me.  If I DO find a way to do it, I'll post a message letting ya know how.  =o)  Thanks again!

~Aaron
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now