Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CLIPTOFILE syntax with XP

Status
Not open for further replies.

teletubby5e

Technical User
Oct 31, 2002
147
US
Has anyone had any problems using a script with the command cliptofile, when running under windows xp? i am trying to do what i thought was areal easy script.

telnet to a server
terminal reset to clear screen
perform commands on server
capture buffer to clipboard
cliptofile
mapisend file

i get an email alright, with the subject containing the following command that is pulled from the script. weird.

cliptofile TEXT "c:\backup\logs\TimerResults.txt"

any help will be greatly appreciated.

thanks, jeff
 
Jeff, what happens if you run the following sample script from the ASPECT help file (make sure to create a file called test.was first)?

proc main
string Source = "test.was" ; Source file to copy.
string DestFile = "new.was" ; Destination file.
filetoclip TEXT Source ; Copy source file to the clipboard.
cliptofile TEXT DestFile ; Copy clipboard to destination file.
endproc

This works OK on my XP machine.

Can you post your script?


 
thanks knob,
i had a set capture file statement screwing it up. anyway the script works fine now. i wish that there was a command called buffertoclipboard, but i got it done with a coupoe of sent keystrokes. but i will still post it in case someone does a search on it later .... but i have another part of the process that i am having trouble with that involves the date syntax, but i will start another thread. on that since it is a different issue....
thanks again ...

proc main
string sMailLogon = "me"
string sMailPassword = "mypass"
string sTo = "me@here.com"
string sCC = ""
string sBCC = ""
string sSubject = "Timer Backup Run"
string sContents = "c:\backup\logs\TimerResultsEmail.txt"
string sAttach = "c:\backup\logs\TimerResults.txt"
string sMailError

connectmanual TELNET "172.16.1.16"

transmit "^M"
waitfor "login:" forever
transmit "mylogin^M"
waitfor "Password:" forever
transmit "mypass^M"
waitfor "Multiple Sessions" forever
transmit "N^M"
waitfor "start Menu Program" forever
transmit "^M"
mspause 500
transmit "SH^M"
waitfor "#" forever

TERMRESET

transmit "cat /home/timer/spool/TIMER^M"
waitfor "#" forever

transmit "cat /u/timer/spool/bkup.lst^M"
waitfor "#" forever

transmit "exit^M"

; COPIES SCREEN BUFFER TO CLIPBOARD
sendkey ALT 'E'
sendkey 'B'
sendkey 'C'

; SENDS CLIPBOARD TO TEXT FILE FOR EMAILING
cliptofile TEXT "c:\backup\logs\TimerResults.txt"
cliptofile TEXT "c:\backup\logs\TimerResultsEmail.txt"

; EMAILS OUT VIA OUTLOOK EXPRESS
mapisend sMailLogon sMailPassword sTo sCC sBCC sSubject FILE sContents sAttach sMailError

TRANSMIT "^M"
TRANSMIT "Q^M"
TRANSMIT "Q^M"
pwexit

endproc
 
It saved me some lines in the script.

Thanks again for teaching me a new command!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top