|
-
Aug 1st, 2000, 08:47 AM
#1
Thread Starter
Fanatic Member
how do i send keystrokes to a non-active application.
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Aug 1st, 2000, 08:56 AM
#2
Do you mean using the SendKey's method?
Code:
AppActivate "Untitled - Notepad"
SendKeys "ABC"
-
Aug 1st, 2000, 08:57 AM
#3
Thread Starter
Fanatic Member
Yes,
but I need to do it in the background...
I need to telnet into a system using the windows telnet application. Start a log file send the commands and get my data that will then output in a text file
There must be an API for sending a keystroke to a certain window
[Edited by kurtsimons on 08-01-2000 at 10:06 AM]
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Aug 1st, 2000, 10:30 AM
#4
Thread Starter
Fanatic Member
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Aug 1st, 2000, 11:24 AM
#5
Fanatic Member
Use the MouseEvent Api
Code:
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Private Const MOUSEEVENTF_ABSOLUTE = &H8000
Private Const MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
Private Const MOUSEEVENTF_MIDDLEDOWN = &H20
Private Const MOUSEEVENTF_MIDDLEUP = &H40
Private Const MOUSEEVENTF_MOVE = &H1
Private Const MOUSEEVENTF_RIGHTDOWN = &H8
Private Const MOUSEEVENTF_RIGHTUP = &H10
Private Const MOUSEEVENTF_WHEEL = &H80
Private Const MOUSEEVENTF_XDOWN = &H100
Private Const MOUSEEVENTF_XUP = &H200
Private Const WHEEL_DELTA = 120
Private Const XBUTTON1 = &H1
Private Const XBUTTON2 = &H2
Sub Main()
'PURPOSE: Press and then release the left mouse button.
Dim int_Coordinates As Integer
Call mouse_event(MOUSEEVENTF_LEFTDOWN, int_Coordinates, int_Coordinates, 0, 0)
Call mouse_event(MOUSEEVENTF_LEFTUP, int_Coordinates, int_Coordinates, 0, 0)
end Sub
Chemically Formulated As:
Dr. Nitro
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
|