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

Multiple Scripts using DDEEXECUTE

Status
Not open for further replies.

aaiqbal

Programmer
Sep 15, 2003
26
US
Hey Everyone,
I am using a script to dynamically open a new window and run a script in that window. Is it possible for me to run more than 1 script in that remote window? ProComm seems to completely skip over the execution of the second script in the remote window. (The execution of the first script is fine). I would appreciate any help.
 
You should be able to run more than one script consecutively via DDE. Here is a sample script from my site that original ran just the hints script, but I modified it to also run the hostutil script five seconds later.

proc main
string pathname
integer pwhwnd
long pwchanid

pathname = $pwtaskpath ;Get PW's path.
addfilename pathname "PW5.EXE" ;Add Procomm's EXE.
if run pathname ;Run the program.
pause 2
pwhwnd = $mainwin ;Get the active window ID.
if ddeinit pwchanid "PW5" "System" pwhwnd ;Establish DDE connection.
ddeexecute pwchanid "EXECUTE HINTS.WAX"
usermsg "DDE channel successfully established!"
pause 5
ddeexecute pwchanid "EXECUTE HOSTUTIL.WAX"
else
errormsg "Error initializing DDE channel"
endif
else ;Problems running program.
errormsg "Error running %s" pathname
endif
endproc

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

Part and Inventory Search

Sponsor

Back
Top