executing commands after GET INPUT within the same script

Buddy Bishop
I have a command that gets user input from the prompt and sets an attribute. I can't put any other code past the GET INPUT in the script because it runs those subsequent script statements BEFORE it actually is ready to get the input from the command box in the user interface. The subsequent statements fail because they depend on the GET INPUT information. At least that's what I think I'm seeing happen.
How can I use GET INPUT successfully, and then immediately run another command that use the supplied (and processed/manipulated) input and then return to the script?

Even without GET INPUT, I'd also like to know how to have a script run one or more custom commands (with parameters), do them in series and return to the script when completed.

I guess an event driven environment might make this impossible without having some jscript or additional engine capability, but I'm not sure.

The Pixie
You need to put the command inside the get input. in code it looks like this:
get input {
DoStuffHere()
}

In the GUI, you need to click the "Add new script" that is directly under it, and indented to the right.

Buddy Bishop
Thanks. That of course works!
I've only been using Quest a few days, so I'be have a bit of a curve.
Ive been writing .vbs and .cmd for years, but this language structure is different enough to make me feel really lost on some basic stuff.

I'll mention a few things I've picked up along the way so far. (don't laugh too much - or correct me if I'm wrong))
The GET INPUT block is best to be the last thing in a script and logic simply has to be made to accomodate it for best results.
Variables aren't designed to be global, so using object attributes overcomes that.
The proper return syntax in a Boolean function is return (true) /or/ return (false)
To have a script call a command as though te user typed it: HandleCommand("take apple", null) - (thanks jaynabonne!)
To make a comment in a script preceed it by //
The forum and the moderators are great.

HegemonKhan
for scripting, imagine an outline format, in how it works~runs (order of operations):

I. xxx
-> A. xxx
->-> 1. xxx
->->-> a. xxx
->->-> b. xxx
->-> 2. xxx
->->-> a. xxx
-> B. xxx
II. xxx

I -> A -> 1 -> a -> b -> 2 -> a -> B -> II (in general: ignoring a lot of exceptions/complexity of the order of operations, of course)

whereas, cmd (the computer's command promp anyways, not sure if this is the same as your '.cmd' language):

1. :start
2. goto end
3. :middle
4. goto end2
5. :end
6. goto middle
7. :end2
8. goto start (infinite loop, I know, lol: don't do this!)

the new languages allow for indenting (nesting: layers of scripts: scripts within scripts), functions and 'while/do-while' loops (all 3 handle looping), and etc.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums