Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keyboard Macros
Message
 
To
08/12/2006 11:37:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Novell 6.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01176112
Message ID:
01176124
Views:
10
>Is there any quick way to write a program that will do keyboard macros and direct the keystrokes to another program running in Windows? Basically what I need is something that will hold down the right mouse button for so many seconds then release and start it again. But like after so many times doing that, then press the F4, then start doing it again. Can you even do a keyboard command to hold the right mouse button down for a certain period of time? and again, is it possible to direct the keyboard macros to another program running in windows?

not tested at all:
DECLARE INTEGER keybd_event IN WIN32API;
                INTEGER bVk,;
                INTEGER bScan,;
                INTEGER dwFlags,;
                INTEGER dwExtraInfo

#define VK_LBUTTON 0x01
#define VK_RBUTTON 0x02
#define VK_F4      0x73

#define KEYEVENT_DOWN 0x00
#define KEYEVENT_UP   0x02

keybd_event(VK_RBUTTON, 0, KEYEVENT_DOWN, 0)
*** wait for some seccods
keybd_event(VK_RBUTTON, 0, KEYEVENT_UP, 0)

keybd_event(VK_F4, 0, KEYEVENT_DOWN, 0)
*** wait for some seccods
keybd_event(VK_F4, 0, KEYEVENT_UP, 0)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform