User input/Graphical: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: changed comments and whitespace, simplified the code.)
No edit summary
Line 90: Line 90:
<lang applescript>set input to text returned of (display dialog "Enter text:" default answer "")</lang>
<lang applescript>set input to text returned of (display dialog "Enter text:" default answer "")</lang>
<lang applescript>set input to text returned of (display dialog "Enter a number:" default answer "") as integer</lang>
<lang applescript>set input to text returned of (display dialog "Enter a number:" default answer "") as integer</lang>

=={{header|Arturo}}==

<lang arturo>use ~gui

window @mainWindow #{
:title "User Input / Graphical"
:size #(400 300)

vbox #{
hbox #{
label "string" #{}
textfield @str "" #{}
}
hbox #{
label "number" #{}
textfield @num "" #{}
}
button "Enter data" #{
:onClick {
print "Got: " + $(str.get) + ", " + $(num.get)
}
}
}
}

app @main "UserInput.Graphical" mainWindow #{}
main.run</lang>

{{out}

[[File:Example.jpg]]

<pre>Got: hello, 75000</pre>


=={{header|AutoHotkey}}==
=={{header|AutoHotkey}}==