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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exel to terminal emulator

Status
Not open for further replies.

fondude

Vendor
Feb 27, 2004
2
US
I'm trying to have procomm using aspect, take information from a spreadsheet and input it using a vt-100 emulation.
I understand aspect scripting should accomplish this for me.
Please help!!
 
You can find some scripts on the samples page of my site that will show you how to use DDE to access a spreadsheet and read data from a specified cell.


aspect@aspectscripting.com
 
Try this:

It takes row-by-row from column A in Excel and types it into ProComm. You have to have Excel open. Create an excel file called TEST.xls and place it in your C:\ drive. Place a lowercase "exit" at the end of your text to tell the script to end. The "waitfor >>" is from Universe but you may have a different prompt.


txflush
pause 1
rxflush


Clear
transmit "^M"
Capture Off
Set Capture File "Current-System.TXT"
Set Capture Overwrite On
set dnldpath "c:\TEST.XLS"

Waitfor ">>"
if ddeinit SystemVar "excel" "system"
ddeexecute SystemVar "[FULL(TRUE)]"
if not ddeinit LinkVar "excel" "sheet1"
errormsg "Couldn't establish DDE link to spreadsheet sheet1"
else
Col=1, Row=1, Passw = " "
while not nullstr Passw
strfmt Pos "R%iC%i" Row Col
dderequest LinkVar Pos Passw
if stricmp Passw "exit`r`n"
exitwhile
else
strreplace Passw "`r`n" ""
Waitquiet 1
Transmit Passw
Transmit "^M"
Waitfor ">>" forever
Row++
endif
endwhile
endif
ddeterminate LinkVar
ddeterminate SystemVar
else
errormsg "Couldn't establish DDE link to Excel!"
halt
endif
endproc

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top