• Log in or sign up for an account here: https://www.sythe.org/login

Working with Constants and Variables.

Ryan

Hopeless Romantic

Banned
Joined
Mar 14, 2006
Sythe Gold
56
Messages
2,946
Location
Australia
Ok when making scar scripts it makes a load easyer to use constants and variables.

Remember !! These always go before Begin and after program new; ( or what ever yours is )

Ok so you start with:

ProgramNew;
Begin
End.

We need :

program New;
var text:string; // If you put string, it meens its going to use letters.
time :integer; // If you put integer, its going to use number.

Const Welcome = 'Hello!' ;

Begin
////// Setup //////
text :='text here' // Put your text here.
time :=(2000) // Your time here in milliseconds.
////// End setup //////
repeat
sendkeys (text)
wait(time)
until (false)
end.

Now that should give you a working auto talker.

Ok well now to explain the variables.

A variable is something can you can change somewhere in the script.
like this

var text:string;

(somewhere in your script)

text = (text :='text here')

So what ever you type something like:

sendkeys (text) it will say "text here"

or

writeln "text" It will say your text.

Now with Constants:

These are something that cannot be changed during the script only defined at the start.

like

Const Welcome = "Hey"

Then in your script when you say something like:

writeln (Welcome)

It wil say Hey instead of Welcome.


Well there are some basics about Constants and Variables, i will edit it later some other things.

Good luck scripting ;)
 
Runescape Gamblingrunescape gambling
Back
Top