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.
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.