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!" else errormsg "Error initializing DDE channel" endif else ;Problems running program. errormsg "Error running %s" pathname endif endproc