Alterego Posted February 16, 2005 Share Posted February 16, 2005 Man..there has to be a way! If I can get this text to the clipboard via left click, {s}, {ENTER}, i can start logging this stuff. is cmd.exe onto fake mouse clicks? it doesnt appear to work at all.AutoItSetOption("TrayIconDebug", 1) ;;unfortunately cmd.exe gives us no controls with which to interact. very crude, this. Do If ProcessExists("cmd.exe") Then $a = WinGetTitle(@SystemDir & "\cmd.exe") WinActivate($a) WinWaitActive($a) WinSetState($a, "", @SW_MAXIMIZE) MouseMove(50, 50) MouseDown("left") Sleep(200) MouseUp("left") Sleep(750) Send("{s}") Sleep(750) Send("{ENTER}") $b = ClipGet() MsgBox(1, "", $b) EndIf Sleep(1000) Until 1 = 0Is there any way to use something like VBs Keybd_Event? I dont know but have read that the OS cant tell the difference between real and nonreal events when used with that.*sigh* This dynamic web page is powered by AutoIt 3. Link to comment Share on other sites More sharing options...
Alterego Posted February 16, 2005 Author Share Posted February 16, 2005 ahh, here it is on the MSDN site: linkThe keybd_event function synthesizes a keystroke. The system can use such a synthesized keystroke to generate a WM_KEYUP or WM_KEYDOWN message. The keyboard driver's interrupt handler calls the keybd_event function.It's too bad though, it can't be done with just the keyboard. Need a damn mouse click! /me searches for a mouse equivalentanyone tried this before? This dynamic web page is powered by AutoIt 3. Link to comment Share on other sites More sharing options...
Alterego Posted February 16, 2005 Author Share Posted February 16, 2005 /me continues conversation with self hey, i got it to work! can you believe that? AutoItSetOption("TrayIconDebug", 1) ;;unfortunately cmd.exe gives us no controls with which to interact. very crude, this. Do If ProcessExists("cmd.exe") Then $a = WinGetTitle(@SystemDir & "\cmd.exe") WinActivate($a) WinWaitActive($a) WinSetState($a, "", @SW_MAXIMIZE) MouseMove(5, 5) MouseDown("left") Sleep(200) MouseUp("left") Sleep(750) Send("{e}") Sleep(750) Send("{s}") Sleep(750) Send("{ENTER}") $b = ClipGet() MsgBox(1, "", $b) EndIf Sleep(1000) Until 1 = 0 ideally you wouldn't have to activate the window and could interact with a control...but there just isnt anything. still...i can log everything that goes across a server's cmd.exe with this This dynamic web page is powered by AutoIt 3. Link to comment Share on other sites More sharing options...
Guest BrainJelly Posted February 19, 2005 Share Posted February 19, 2005 Here is another way to do this. I used the windows hotkeys for the command window. AutoItSetOption("TrayIconDebug", 1) ;;unfortunately cmd.exe gives us no controls with which to interact. very crude, this. ;;uses the windows hotkeys Do If ProcessExists("cmd.exe") Then $a = WinGetTitle(@SystemDir & "\cmd.exe") WinActivate($a) WinWaitActive($a) Send("!{SPACE}{UP 3}{RIGHT}{UP 3}{ENTER 2}") $b = ClipGet() MsgBox(1, "", $b) EndIf Sleep(1000) Until 1 = 0 Link to comment Share on other sites More sharing options...
Blue_Drache Posted February 19, 2005 Share Posted February 19, 2005 (edited) Here is another way to do this.I used the windows hotkeys for the command window.AutoItSetOption("TrayIconDebug", 1) ;;unfortunately cmd.exe gives us no controls with which to interact. very crude, this. ;;uses the windows hotkeys Do If ProcessExists("cmd.exe") Then $a = WinGetTitle(@SystemDir & "\cmd.exe") WinActivate($a) WinWaitActive($a) Send("!{SPACE}{UP 3}{RIGHT}{UP 3}{ENTER 2}") $b = ClipGet() MsgBox(1, "", $b) EndIf Sleep(1000) Until 1 = 0 <{POST_SNAPBACK}>Ok, one better...AutoItSetOption("TrayIconDebug", 1) ;;unfortunately cmd.exe gives us no controls with which to interact. very crude, this. ;;uses the windows hotkeys Do If ProcessExists("cmd.exe") Then $a = WinGetTitle(@SystemDir & "\cmd.exe") WinActivate($a) WinWaitActive($a) Send("!{SPACE}ES{ENTER}") $b = ClipGet() MsgBox(1, "", $b) EndIf Sleep(1000) Until 1 = 0Why use all those keystrokes when you don't have to? E is for the Edit section, and the S is for the Select All Edited February 19, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now