|
-
Jun 12th, 2000, 02:46 AM
#1
Thread Starter
Member
Hi,
I have a really simple question. Can someone please give me some example code to send CTRL-S to a window. I can get the window handle, I just don't know how to send CTRL combos.
Thanks,
RIchard
-
Jun 12th, 2000, 03:05 AM
#2
Use the SendKeys statement.
-
Jun 12th, 2000, 03:13 AM
#3
The Ctrl is represented by ^. Therefor, you can use the following method to send Ctrl+S
Code:
AppActivate "MyApp"
SendKeys "^" + "V"
-
Jun 12th, 2000, 03:15 AM
#4
PowerPoster
SendKeys( "^s" )
as I remember
-
Jun 12th, 2000, 03:24 AM
#5
Ha! I forgt to change the V to an S in my example . I was using Notepad to test my code and it doesn't have a Ctrl+S fnction so i changed it to V.
-
Jun 13th, 2000, 06:37 AM
#6
transcendental analytic
Use setforegroundwindow instead of using appactivate, as you may not know what youre app's caption is if it's changing, also another apps caption can interfere. And you said you got the handle, all you need is to pass it
Code:
Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|