View unanswered posts | View active topics It is currently Sat Apr 18, 2026 11:19 pm



Reply to topic  [ 6 posts ] 
 Guess I don't understand how processIn works 
Author Message
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 270
Unread post Guess I don't understand how processIn works
Running Win 7 Home Premium

Hi all, I'm trying to figure out how to work with the processIn command, so that I can use it to trigger other scripts. I'll post the code for both scripts, test2 and test3, so maybe someone can tell me where I'm going wrong. TWX definitely doesn't like whatever I'm doing, it crashes with an error :

Exception EListError in module twxproxy-205.exe at 0001A726
List index out of bounds (-1).

Understand I wasn't trying to actually accomplish any work with these 2 scripts, I was just messing around with the command to try to get one script to trigger another script, and then have the controlled script trigger the controlling script. My idea with this being that I could have a controlling script trigger a secondary script, pausing it while the secondary script did it's work, and then when the secondary script finished its work it could send a trigger back to the controlling script so that it could continue on with it's work. They compiled and ran, and both of them echoed the text that was supposed to be echoed from the script. Then TWX crashed with the error message above.

test 2
Code:
# test for using processIn to trigger scripts

setTextTrigger 1 :1 "test3 executed"
processIn 1 "start test3"
pause

:1
killTrigger 1
echo "*" "passed successfully"
halt


test 3
Code:
setTextTrigger 1 :1 "start test3"
pause

:1
killTrigger 1
echo "*" "starting test 3"
processIn 1 "test3 executed"
halt


Is this happening because it isn't possible for one script to pass something to another script and then the other script to pass something back to the original controlling script? Did I get the process backwards as to what to put in each script? Or is it something else I'm doing?

Appreciate any insight anyone can give me into the process, thanks


Sun Mar 04, 2012 9:21 pm
Profile
Immortal Op
User avatar

Joined: Fri Jun 25, 2010 6:33 am
Posts: 257
Location: Sydney Australia
Unread post Re: Guess I don't understand how processIn works
Your scripts look fine.. but when i tested them i got the same problem.
I corrected it by reversing the order of the first 2 lines of code in test2.


Code:
# test for using processIn to trigger scripts

processIn 1 "start test3"
setTextTrigger 1 :1 "test3 executed"
pause

:1
killTrigger 1
echo "*" "passed successfully"
halt


Your on the right track with understanding the processin command... good luck :)

_________________
Teamspeak3: 60.242.57.40:9987
Z-Bot does my dirty work!


Sun Mar 04, 2012 10:04 pm
Profile ICQ
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 270
Unread post Re: Guess I don't understand how processIn works
Thanks Archy, I appreciate the insight and the assistance finding out what I've been doing wrong :) I am just coming back to scripting after years away, and I have to say not being a programmer some of this can get pretty confusing. Don't even get me started on using the menu commands, I never could figure out how to use those in scripts, had to put in a long list of echoed text to give the choices :lol:

Some of the purpose behind trying to learn the processIn command is the difficulty I have been having with the INCLUDE commands, although I may be slowly getting a handle on how includes work. I wanted modularity with my scripting which I have seen others say is possible with includes, I get tired of writing the same blocks of code over and over in a script and wanted to come up with a way to do it in modules, each one providing a needed function.

I was thinking modularity, a standardized (as much as possible) variable list, and my own cfg file to read & write from might make it a lot easier to whip up scripts and work with them - after you get all the modules written of course, lol


Sun Mar 04, 2012 10:50 pm
Profile
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 270
Unread post Re: Guess I don't understand how processIn works
I think I spoke too soon. I switched around the 2 lines as you did with script 2, and it stopped me from getting the crash and error code. But something still isn't working. It isn't triggering the textTrigger in test2, if it did test 2 would echo "passed successfully" and then halt. It isn't echoing the message and then halting, and when I do a dump of active variables and triggers, it is showing that test2 is still waiting on it's trigger text from test3.

Here's what I get from the trigger and variable dump :

Code:
Script>
Trigger dump for script: C:\My Programs\TWXProxy 2_05\Scripts\_test2.ts

  Text Triggers:
    1 = [:1, "test3 executed", ""]
  Text-Line Triggers:
  Text-Out Triggers:
  Delay Triggers:
  Event Triggers:

Script>
Enter a full or partial variable name to search for (or blank to list them all)

Dumping all script variables
>
Variable dump for script: C:\My Programs\TWXProxy 2_05\Scripts\_test2.ts


So, any idea what could be going on now? Thanks


Sun Mar 04, 2012 11:19 pm
Profile
Immortal Op
User avatar

Joined: Fri Jun 25, 2010 6:33 am
Posts: 257
Location: Sydney Australia
Unread post Re: Guess I don't understand how processIn works
Sorry... i didnt notice that... the processin command is a bit quirky..
we needed a pause in test3.
here are the revised files..

Code:
# test for using processIn to trigger scripts
processIn 1 "start test3"
setTextTrigger b1 :b1 "test3 executed"
pause

:b1
killTrigger b1
echo "*" & "passed successfully"
halt


Code:
setTextTrigger a1 :a1 "start test3"
pause

:a1
killTrigger a1

SetDelayTrigger c1 :c1 2000
Pause
:c1
killtrigger c1
echo "*" & "starting test 3"
processIn 1 "test3 executed"
halt

_________________
Teamspeak3: 60.242.57.40:9987
Z-Bot does my dirty work!


Sun Mar 04, 2012 11:59 pm
Profile ICQ
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 270
Unread post Re: Guess I don't understand how processIn works
Thanks Archy, that did it :D

Good catch on the pause, I didn't even think about the controlled script working so fast it out-ran the controller script or whatever it was doing


Mon Mar 05, 2012 12:12 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.