Window

From Esolang
Jump to navigation Jump to search

Windows is a programming language that uses windows like Google x: to code

Windows

Example x:
LINK EX2
]
EX2 x:
Hi
GOBACK
]
comments:
Example links to EX2
that means if the user opened example, it would do the stuff in it,
LINK is the goto command which goes to a 
different window, use REDIRECT 
to instantly do that, use GOBACK to go back,
if there is no keyword behind it, it prints it, when it reaches ],
the program does GOBACK, if 
there is no more places to go back to, it halts the program

User actions

HELLO x:
Hello
]
USER:
open HELLO
wait
comments:
open [window] opens a window
wait waits a step
close [window] closes a window
click clicks
maybe [DO] maybe do do or maybe do wait
look look at the screen
if saw [text]:
[do]
] if saw text in this step, do do
or:
[do]
] if after a maybe command, do this when the maybe doesn't run, if after an if, do this when the if doesn't run
if user:
[do]
] if the user of this program, not the USER: part, clicks, then run [do]
user commands take first presence, then window commands

More window commands

STORE [text] IN [window] store the text in the window
GETDATA get the data in this window
IF CLICK:
[DO]
] if user clicks at this command, do do
IF [val] IS [text]:
[DO]
] if val is text, do do
SHOW [text] show text
HIDE [text] hide text
CLOSE [window] closes window
DOWNLOAD [text] INTO [file] puts text in a file
UPLOAD TEXT FROM [file] returns text from a file

Example

Clickorelse x:
IF CLICK:
CLOSE [Clickorelse]
]
DOWNLOAD you got a virus INTO virus
]
USER:
open Clickorelse
maybe click
comments:
this will give you virus if you do not click immediately