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

How to close the Procomm window from the Aspect code 1

Status
Not open for further replies.

CGIProg

Programmer
Feb 16, 2004
8
CA
I'm trying to send a close message to the Procomm Window from the Aspect code. Is this possible to do?
I've tried winclose $PWMAINWIN but that did work.

Please help!!!
Thanks
 
To correct the initial message. The command did NOT work.
 
I tried "pwexit". It ends the script but does not close Procomm. Any more ideas?

Thanks for the help!
 
Nothing. I hear the PC beep and that's it. It stays connected and at the Procomm Meridian mail logon screen.
 
Here is the script:
------------------------
proc Ccs
param string extension


integer Event

string co
string newext
extension = usrext
newext = extension
strcat newext "00"
strcat newext "^M"


co = "^[[;1;4m^O"
strcat co extension
strcat co " ^[[19;47H"

dlgdestroy 0 OK

set modem connection "direct connect-Com1"

commandmode on ; turn on modem command mode
transmit "atd" ; transmit at commands to
transmit "9416" ; area code and
transmit "3047436" ; phone number
transmit "^M"
waitfor "CONNECT" 60 ; wait 60 secs for connect msg


if $CARRIER
;*waitfor "rocomm Plus Ready!^M^J"
transmit "^[OP"
waitfor "^[[;4m^O"
transmit "marva^M"
waitfor "^[[;4m^O"
transmit "1^M"
waitfor "^[[;4m^O"
transmit "1^M"
waitfor "Select a softkey > "
transmit "^[OR"
waitfor "^[[;4m^O"
strcat extension "^M"
transmit extension
waitfor "^[[;7m^OMORE BELOW^[[10;29H"
transmit "^[[B"
waitfor "^[[12;29H"
transmit "^[[B"
waitfor "^[[14;22H"
transmit "^[[B"
waitfor "^[[16;67H"
transmit "^[[B"
waitfor "^[[19;47H"
transmit "^[[B"
waitfor "^[[;1;4m^O4034 ^[[19;47H"
transmit "^[[B"
waitfor "^[[;1;4m^O ^[[19;43H"
transmit "^[[B"
waitfor "^[[;1;4m^O4080 ^[[19;47H"
transmit "^[[B"
waitfor co
transmit "^[[B"
waitfor "^[[;1m^OYes^[[19;46H"
transmit "^[[B"
waitfor "Yes^[[19;43H"
transmit "^[[B"
waitfor "Yes^[[m^O^[[19;46H"
transmit "^[[B"
waitfor "Enabled^[[m^O^[[19;52H"
transmit "^[OS"
waitfor "^[[;4m^O"
transmit newext
waitfor "^[[;4m^O"
transmit newext
waitfor "^[[19;52H"
transmit "^[OP"
waitfor "^[[;4m^O"
transmit "^[OQ"
waitfor "Select a softkey > "
transmit "^[OP"
waitfor " "
transmit "^[OP"
waitfor " "
transmit "^[OP"

else
dialogbox 1 105 59 158 67 27 "Voice Mail Password Reset"
text 4 61 12 38 11 "&Not connected" left
pushbutton 5 57 25 45 16 "&OK" DEFAULT
enddialog

while 1
dlgevent 1 Event
switch Event
case 5
pwexit
endcase
endswitch
endwhile
endif

dialogbox 1 105 59 158 67 27 "Voice Mail Password Reset"
text 4 61 12 38 11 "&The password was reset to the extension followed by 00" left
pushbutton 5 57 25 45 16 "&OK" DEFAULT
enddialog

while 1
dlgevent 1 Event
switch Event
case 5
pwexit
endcase
endswitch
endwhile
endproc
 
Add this line before the pwexit command:

dlgdestroy 1 OK

This will close the previous dialog completely. It was still hanging around and not allowing the pwexit command to do its job.


aspect@aspectscripting.com
 
OH my god that worked. I don't know how to thank you.
I just taught myself how to code Aspect a week ago so I would never have thought of that.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top