| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| having a problem with setEventTrigger https://mail.black-squirrel.com/viewtopic.php?f=15&t=22637 |
Page 1 of 1 |
| Author: | SteveH_66 [ Sat Aug 01, 2009 6:50 pm ] |
| Post subject: | having a problem with setEventTrigger |
I am having a problem with setEventTrigger command. I have it set to go to the next part of the script after the include script I am using terminates. Unfortunately, I am not getting a message from TWX Proxy in SWATH when it terminates. Kind of odd. They are a couple of simple scripts I wrote, just for trying to see if you could use this command to pause a script while an include script was running and then restart it once it stopped. I'll include the code for both scripts Code: #test to see if I can get includes to work for me :begin setEventTrigger done :next "SCRIPT STOPPED" "C:\Program Files\Programs 1\TWX Proxy 2_04\Scripts\include\test_include.ts" include \include\test_include.ts pause :next clientmessage "made it to next" killAllTriggers setDelayTrigger delay :end 10000 pause :end halt This one is the include script Code: clientmessage "test for include working" Why isn't TWX Proxy sending a terminated message when the include script terminates? I tried the include script with a HALT command in it, but that just stopped the main script instead. Thanks for any help you can give. P.S. The main script is in the script directory and the include script is in the include directory if this might have any effect on things, I wouldn't think it should though |
|
| Author: | Promethius [ Sat Aug 01, 2009 8:52 pm ] |
| Post subject: | Re: having a problem with setEventTrigger |
As a guess because you are including the second script into the first and not running it as a seperate script that will terminate. In effect your script is just one script that has the second code inserted into the first. If you use a load command on the second script then you should have it terminate. |
|
| Author: | Vid Kid [ Sat Aug 01, 2009 9:07 pm ] |
| Post subject: | Re: having a problem with setEventTrigger |
Quote: :begin setEventTrigger done :next "SCRIPT STOPPED" "C:\Program Files\Programs 1\TWX Proxy 2_04\Scripts\include\test_include.ts" include \include\test_include.ts pause :next clientmessage "made it to next" killAllTriggers setDelayTrigger delay :end 10000 pause :end halt :begin GoSub :test_include~message :next clientmessage "made it to next" killAllTriggers setDelayTrigger delay :end 10000 pause :end halt #-=-=-=-=-includes-=-=-=-=- Include "include\test_include.ts" The include Quote: clientmessage "test for include working" the include\test_include.ts :message clientmessage "test for include working" Return This should do what you are looking for ... |
|
| Author: | SteveH_66 [ Sun Aug 02, 2009 10:16 pm ] |
| Post subject: | Re: having a problem with setEventTrigger |
Thanks Promethius and Vid Kid, appreciate the help. Vid Kid your method worked like a charm for me. Thanks for the code example in your post. Promethius your method also worked like a charm, after I figured out that the parameter for the setEventTrigger is case sensitive. I was writing all of it in lowercase, and for some reason the script terminated message is like this "scripts\INCLUDE\TEST_INCLUDE.TS" so once I tried writing it out in the script exactly as the message appears in SWATH when the include terminates, worked great. Just thought I would throw that in so if another newbie scripter reads this message looking for information, they won't have to experiment until they figure that out. Probably best to cut and paste the message right out of your helper or telnet client. Really appreciate the help guys |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|