Making a macro
-
Just curious does anyone have a tutorial on how to make a macro in visual c++. I have this program called total recorder that records streaming audio and i have a radio show that comes on early in the morning. I'm usually not away so i wanted to write a c++ program that would launch total recorder say with shellexecute that part is easy. I just can't figure out how to make it click the mouse like a macro. Thanks for your help. Talk to me like a baby cause when it comes to programming i still wear a training pants :) Win32newb "Making windows programs worse than they already are"
-
Just curious does anyone have a tutorial on how to make a macro in visual c++. I have this program called total recorder that records streaming audio and i have a radio show that comes on early in the morning. I'm usually not away so i wanted to write a c++ program that would launch total recorder say with shellexecute that part is easy. I just can't figure out how to make it click the mouse like a macro. Thanks for your help. Talk to me like a baby cause when it comes to programming i still wear a training pants :) Win32newb "Making windows programs worse than they already are"
You need to look into SendMessage, perhaps. It sounds messy to me though. I thought you wanted to create a macro in C++, as in #define, I was ready to read you the riot act :-) Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
-
Just curious does anyone have a tutorial on how to make a macro in visual c++. I have this program called total recorder that records streaming audio and i have a radio show that comes on early in the morning. I'm usually not away so i wanted to write a c++ program that would launch total recorder say with shellexecute that part is easy. I just can't figure out how to make it click the mouse like a macro. Thanks for your help. Talk to me like a baby cause when it comes to programming i still wear a training pants :) Win32newb "Making windows programs worse than they already are"
I think I can help U in it. But definately it needs detailed discussion. Time being. Every Microsoft windows has a class name and window text. and at any given instance Desktop will be parent of all windows. U can find these using Spy++ in windows. So just iterate from desktop as root windows using treeView to Ur target message. Using SendMessage or Postmessage pass WM_BCLICK or WM_LBUTTONDOWN or what ever. hope it helps
-
I think I can help U in it. But definately it needs detailed discussion. Time being. Every Microsoft windows has a class name and window text. and at any given instance Desktop will be parent of all windows. U can find these using Spy++ in windows. So just iterate from desktop as root windows using treeView to Ur target message. Using SendMessage or Postmessage pass WM_BCLICK or WM_LBUTTONDOWN or what ever. hope it helps
I looked up SendMessage and post message but wasn't too clear on it. How do i tell it which window to send it to? I opened up spy++ and i found my message. I'm assuming i need to the window handle say 004f3c or whatever. so would i put PostMessage(WM_LBUTTONDOWN,004f3c,NULL); Sorry but confused i kinda understand what your saying but its new to me so i'm kinda lost. thanks for the help by the way. Win32newb "Making windows programs worse than they already are"
-
I looked up SendMessage and post message but wasn't too clear on it. How do i tell it which window to send it to? I opened up spy++ and i found my message. I'm assuming i need to the window handle say 004f3c or whatever. so would i put PostMessage(WM_LBUTTONDOWN,004f3c,NULL); Sorry but confused i kinda understand what your saying but its new to me so i'm kinda lost. thanks for the help by the way. Win32newb "Making windows programs worse than they already are"
U can't depend upon handle as they R dynmaic. So derive Windows handle from FindWindow(class name, WinText) kind of API. Use this handle in Ur SendMessage. Now U must be Pretty clear I think. Mind U there is no standard method of doing this. I derived this method after 2 months of shuffling with Charles Perzolt book. Highly recommended. One more just read the query posted by codeCharmer "Enumerating Dialog Controls". U have to adopt almost similar Algo. cheers Siddharth