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

Cannot use DDEEXECUTE to run multiple scripts!?!

Status
Not open for further replies.

aaiqbal

Programmer
Sep 15, 2003
26
US
Hey Guys and Gals,
This is Abdul again. I want to again thank those of you who have helped. This is kind of a repost because I'm still having trouble executing multiple scripts. This time, I'm including my code in hopes that it will clarify the situation and assist in any help you can provide. If I only execute 115200.wax, the script runs fine and the remote window also closes down at the end as expected. But if I try to run multiple scripts back to back, the remote terminal runs the first script, then my window runs the file_send.wax using my function RunTest but the other window never runs the second script "file_get". Any help would be appreciated.

proc main

string pwexe
integer handle2
long window2
clear
strfmt pwexe "%s\PW5.exe" $pwtaskpath
if run pwexe
pause 2

handle2 = $mainwin
if ddeinit window2 "PW5" "System" handle2

if ddeexecute window2 "EXECUTE 115200.wax"
pause 20
termmsg "Teminal Init Successful!`r`n"

RunTest ("Send File", "file_send.wax", A)

if ddeexecute window2 "EXECUTE File_Get.wax"
pause 5
termmsg "File Transfer Successful!`r`n"
else
termmsg "File Transfer Unsuccessful!?!`r`n"
endif

else
termmsg "Terminal Init Unsuccessful!?!`r`n"
endif
else
termmsg "Error initializing DDE channel`r`n"
endif
else
termmsg "Error running %s`r`n" pwexe
endif

ddeexecute window2 "PWEXIT"
ddeterminate window2

endproc
 
If you comment out the call to RunTest, does the second script execute as expected? Does the command to launch the second script work if it is the only command in your script (to make sure that the script it is calling works correctly)?


aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top