-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript syntax.txt
68 lines (51 loc) · 1.85 KB
/
script syntax.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
To store a variable, use REMEMBER
Example:
remember, path is "C:\path\to\file"
remember name is MyProgram
To use a stored variable, use {} to reference them (case sensitive)
Example:
ask y/n "Yes or no?" for answer
say "You said: {answer}"
this stores a new variable called "answer" with the value the user types
Since it's a yes or no question (y/n) any answer given starting with 'Y' will be TRUE, anything else and it's FALSE
if y/n wasn't put in, the variable will be stored as is
To check if a variable is something, use {} to reference them using IF
Example:
if {answer} is true then download http://somesite.io/program/to/download.exe
if {name} is Akoot then say "Hey, that's my name!"
download {URL} into {FOLDER|FILE} [loudly]
run {SYSTEM COMMAND}
say {MESSAGE}
ask {MESSAGE} for{VARIABLE}
ask {MESSAGE} to [not] {COMMAND}
move|copy {FILE(s)|everything} from {FOLDER} into {FOLDER} [loudly]
save {VAR(s)|everything} to {FILE}
open {FILE|URL|DIRECTORY}
if {VARIABLE} is [not] {TRUE|FALSE|OBJECT} then {COMMAND}
wait [NUMBER] [seconds|milliseconds]
delete {FILE|FOLDER} [loudly]
remember {VARIABLE} is {VALUE}
write {LINE} to {FILE} [at line {LINE #}]
Examples:
download http://somesite.io/repo/thing.exe into %user.home%
run path\to\someprogram.exe -arg1 -arg2 --arg3
say "Hello World!" "This is a new line!"
ask "Would you like to delete system32?" for delete
if {delete} is true then delete C:\Windows\System32
ask "What is your name?" for name
say "Hello, {name}!"
open http://google.com
open %user.home%\Desktop
open README.txt
remember, installDir is "C:\Program Files\Program"
say "Installing bin..."
move everything from bin into {installDir}
delete bin
save installdata.txt
move installdata.txt from here into {installDir} loudly
write "hey there person" in hi.txt at line 10
write "hey there" in hi.txt
wait 10 seconds
wait 500 milliseconds
wait 1 second
wait