View unanswered posts | View active topics It is currently Fri Feb 23, 2024 3:04 am

Reply to topic  [ 2 posts ] 
 Issues with a script command 
Author Message

Joined: Wed Nov 06, 2002 3:00 am
Posts: 268
Unread post Issues with a script command
I am having trouble with a script command, the setAutoTrigger. I am trying to use it in a login Script.
Here is the script code :

# First, we declare our Variables

loadVar $person
loadVar $passWord

# Now, we set our Triggers
setAutoTrigger logInName1 "Please enter your name (ENTER" $person & "*"
setAutoTrigger PASSWORD1 "Password?" $passWord & "*"
setAutoTrigger PAUSES1 "[Pause]" "a " 0
setAutoTrigger MENU1 "Selection (? for menu)" GAME & "*"
setAutoTrigger MENU2 "Enter your choice:" "T" & "*"
setAutoTrigger todaysLOG "Show today's log? (Y/N)" "*"
setAutoTrigger gameMESSAGES "Delete messages? (Y/N)" "Y" & "*"
setTextTrigger textTrig1 "Command [TL=" :finish


Here is the documentation text from the TWX Scripting reference :

Purpose: Creates a trigger that will activate when a text containing a specific value has been received from the remote server and respond to that trigger with the specified text.

Syntax: setAutoTrigger {name} {value} {response} [repeat]

{name}: The name of the trigger to create. This name is used for later references to the trigger.

{value}: A value that is required to be in the block of incoming text for the trigger to activate.

{response}: The response to send when the trigger is activated.

[repeat]: Optionally set the number of times to repeat this trigger. Use 0 for infinite. The default value is 1.

Notes: The auto trigger will automatically respond to an event instead of jumping to a label within the script.

Note that no triggers will activate unless the script has been paused with a "pause", "waitFor" or "waitOn" command.


# Respond to pause prompts until trigger is killed.
SetAutoTrigger PAUSE "[Pause]" "a " 0

# Respond with a system varable & <enter> to the login prompt.
SetAutoTrigger LOGON "Please enter your" LOGINNAME & "*"

# Send <enter> to a single prompt.
SetAutoTrigger SHOWLOG "Show today's log?" "*"

I can't see where I am not putting in all the parameters for the command. But, TWX Proxy returns this error code and kills the script :

Script compilation error: Too few parameters for command 'SETAUTOTRIGGER', line
10 (0_LOGIN.TS)

Can anyone tell me where I am messing up, what parameter is missing for that command? Or does that command not work all that well and a scripter needs to use setTextTrigger or some other trigger or waitFor or waitON or whatever instead?

Sat Dec 02, 2023 12:21 pm
Chief Warrant Officer
User avatar

Joined: Sat Feb 27, 2016 1:01 am
Posts: 193
Location: Molon Labe
Unread post Re: Issues with a script command
Hmm...try moving this to the top of the order and see if the error reports at a lower line #. Perhaps, firstly, try running it without the 0 repeat; also, try it without the "a", just send a space: setAutoTrigger PAUSES1 "[Pause]" "a " 0

Otherwise comment out: "setAutoTrigger PASSWORD1 "Password?" $passWord & "*"" to see if the script runs without error, and just enter the PW manually.

The object of life is not to be on the side of the majority, but to escape finding one’s self in the ranks of the insane.” — Marcus Aurelius

TWX Proxy Reference Online

Thu Dec 07, 2023 11:08 pm
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 7 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.