I have the need to throw a few buttons on the screen, i've done that no problem.
Now, when i press a button, I want it to execute a few keystroaks etc in game.
While onleftclick works just fine if its a single keystroke, it doesn't seem to allow me to use a semicolon and seperate commands ( like add a wait then another keystroke ).
So i'm assuming i should use the <command> tag for this, but I can't for the life of me figure out the syntax and the wiki is lacking on it. How would i have it execute a script for example? Or even call a proc in a script if that's possible?
LavishGUI
Moderators: Lavish Software Team, Moderators
The <command> tag predates <onleftclick> and is not needed or recommended for new projects. You can just use a button element instead of a commandbutton (for which the only purpose was the added <command> tag, which is now replaced by <onleftclick> in every element)
<onleftclick> creates a LavishScript atom (a function that executes atomically) out of the code within it. You separate commands with multiple lines, and they are compiled into a script.
You can't add waits in either case. You can use "[[Command:TimedCommand|TimedCommand]]" to asynchronously kick off a command after a minimum amount of time has passed. You use [[Command:RunScript|RunScript]] to run a script. Calling a non-atomic function is not possible outside of a script
<onleftclick> creates a LavishScript atom (a function that executes atomically) out of the code within it. You separate commands with multiple lines, and they are compiled into a script.
You can't add waits in either case. You can use "[[Command:TimedCommand|TimedCommand]]" to asynchronously kick off a command after a minimum amount of time has passed. You use [[Command:RunScript|RunScript]] to run a script. Calling a non-atomic function is not possible outside of a script
-
- GamingTools Subscriber
- Posts: 33
- Joined: Sat Jul 09, 2005 1:21 pm