08-03-2007, 05:51 PM
Here is the first half of the code: I am calling a terminal emulation program in one window, logging on to an AS400 system, then opening Excel in another window. The second half of the code is flipping back and forth between the two windows, copying the values in the Excel file and pasting them into the AS400.
Is the problem the fact that I have key commands and the server does not know which keyboard to use if I do not watch the macro execute?
run "C:\Program Files\mochasoft\mtn5250.exe"
wait 5
act win(" - Mocha W32 TN5250")
spe 500
key A{f}
key "c"
key "206.17.40.143"
key YY
wait 2
key "JOHNS"
key T
key Y
wait 3
key "5"
key Y
key "2"
key Y
wait 2
spe 700
run "Excel.exe"
key A{f}
key "1"
key "N"
key "M"
key "N"
key "T"
key TTRRRSTST
key "T"
key "F"
act win("206.17.40.143 - Mocha W32 TN5250")
key "A"
act win("Microsoft Excel - PBWO" "XLMAIN")
Is the problem the fact that I have key commands and the server does not know which keyboard to use if I do not watch the macro execute?
run "C:\Program Files\mochasoft\mtn5250.exe"
wait 5
act win(" - Mocha W32 TN5250")
spe 500
key A{f}
key "c"
key "206.17.40.143"
key YY
wait 2
key "JOHNS"
key T
key Y
wait 3
key "5"
key Y
key "2"
key Y
wait 2
spe 700
run "Excel.exe"
key A{f}
key "1"
key "N"
key "M"
key "N"
key "T"
key TTRRRSTST
key "T"
key "F"
act win("206.17.40.143 - Mocha W32 TN5250")
key "A"
act win("Microsoft Excel - PBWO" "XLMAIN")
