5. SendKeys and Notepad. NT only!

; clear the screen
cls

; write your string to the screen
@wksta ", 123.45.67" ?

; use sendkeys to select all of the text on the screen (should be only one line) and put it on the clipboard
$=sendkeys("~ es{enter}")

; run notepad
run "notepad"

; wait until notepad has finished loading and has focus
while setfocus("Untitled - Notepad")<>0 loop

; paste the clipboard contents to notepad
; save the file as c:\path\filename.txt
; and exit notepad
$=sendkeys("^v^sc:\path\filename.txt{enter}~{f4}")


cj

 


[This message has been edited by cj (edited 28 March 2001).]