Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
|
|
@ -0,0 +1,11 @@
|
|||
BEGIN
|
||||
FILE window;
|
||||
open (window, "Hello!", stand draw channel);
|
||||
draw device (window, "X", "600x400");
|
||||
draw erase (window);
|
||||
draw move (window, 0.25, 0.5);
|
||||
draw colour (window, 1, 0, 0);
|
||||
draw text (window, "c", "c", "Goodbye, world!");
|
||||
draw show (window);
|
||||
close (window)
|
||||
END
|
||||
|
|
@ -1,9 +1,15 @@
|
|||
; display a window
|
||||
$hMain = GUICreate("Hello World", 178, 125)
|
||||
GUICtrlCreateLabel("Goodbye, world", 48, 48, 78, 17)
|
||||
GUISetState()
|
||||
While GUIGetMsg() <> -3
|
||||
#include <GUIConstantsEx.au3>
|
||||
|
||||
$hGUI = GUICreate("Hello World") ; Create the main GUI
|
||||
GUICtrlCreateLabel("Goodbye, World!", -1, -1) ; Create a label dispalying "Goodbye, World!"
|
||||
|
||||
GUISetState() ; Make the GUI visible
|
||||
|
||||
While 1 ; Infinite GUI loop
|
||||
$nMsg = GUIGetMsg() ; Get any messages from the GUI
|
||||
Switch $nMsg ; Switch for a certain event
|
||||
Case $GUI_EVENT_CLOSE ; When an user closes the windows
|
||||
Exit ; Exit
|
||||
|
||||
EndSwitch
|
||||
WEnd
|
||||
GUIDelete($hMain)
|
||||
;a message box
|
||||
MsgBox(0, "", "Goodbye, world")
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
MsgBox(0,"Goodbye","Goodbye, World!")
|
||||
MsgBox(0, "Goodbye", "Goodbye, World!")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
@echo off
|
||||
|
||||
::Output to console
|
||||
echo Goodbye, World!
|
||||
::Output to message box [Does not work in Window 7 and later]
|
||||
msg * "Goodbye, World!" 2>nul
|
||||
|
||||
::Output to message box
|
||||
msg * "Goodbye, World!"
|
||||
|
||||
::Output to file and open it
|
||||
echo Goodbye, World!>temp.txt
|
||||
start temp.txt
|
||||
|
||||
pause>nul
|
||||
::Using MSHTA.EXE Hack::
|
||||
@mshta javascript:alert("Goodbye, World!");code(close());
|
||||
@mshta vbscript:Execute("msgbox(""Goodbye, World!""):code close")
|
||||
pause
|
||||
|
|
|
|||
31
Task/Hello-world-Graphical/Elena/hello-world-graphical.elena
Normal file
31
Task/Hello-world-Graphical/Elena/hello-world-graphical.elena
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#import forms.
|
||||
#import system.
|
||||
|
||||
#class Window :: SDIDialog
|
||||
{
|
||||
#field goodByeWorldLabel.
|
||||
#field closeButton.
|
||||
|
||||
#constructor new <= (new)
|
||||
[
|
||||
goodByeWorldLabel := Label new.
|
||||
closeButton := Button new.
|
||||
|
||||
theControls append:goodByeWorldLabel.
|
||||
theControls append:closeButton.
|
||||
|
||||
$self set &x:250 &y:200.
|
||||
$self set &width:200 &height:110.
|
||||
|
||||
goodByeWorldLabel set &x:40 &y:10.
|
||||
goodByeWorldLabel set &width:150 &height:30.
|
||||
goodByeWorldLabel set &caption:"Goodbye, World!".
|
||||
|
||||
closeButton set &x:20 &y:40.
|
||||
closeButton set &width:150 &height:30.
|
||||
closeButton set &caption:"Close".
|
||||
|
||||
closeButton set &onClick:args
|
||||
[ 'program stop. ].
|
||||
]
|
||||
}
|
||||
|
|
@ -4,11 +4,11 @@ import "github.com/mattn/go-gtk/gtk"
|
|||
|
||||
func main() {
|
||||
gtk.Init(nil)
|
||||
win := gtk.Window(gtk.GTK_WINDOW_TOPLEVEL)
|
||||
win := gtk.NewWindow(gtk.WINDOW_TOPLEVEL)
|
||||
win.SetTitle("Goodbye, World!")
|
||||
win.SetSizeRequest(300, 200)
|
||||
win.Connect("destroy", gtk.MainQuit)
|
||||
button := gtk.ButtonWithLabel("Goodbye, World!")
|
||||
button := gtk.NewButtonWithLabel("Goodbye, World!")
|
||||
win.Add(button)
|
||||
button.Connect("clicked", gtk.MainQuit)
|
||||
win.ShowAll()
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
wdinfo'Goodbye, World!'
|
||||
wdinfo 'Goodbye, World!'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
use GTK::Simple;
|
||||
|
||||
my GTK::Simple::App $app .= new;
|
||||
$app.border_width = 20;
|
||||
$app.set_content( GTK::Simple::Label.new(text => "Goodbye, World!") );
|
||||
$app.run;
|
||||
|
|
@ -1,16 +1,13 @@
|
|||
/*REXX (PC/REXX) to display a message in a window (which is bordered). */
|
||||
|
||||
/*REXX (PC/REXX) to display a message in a window (which is bordered). */
|
||||
if fcnpkg('rxwindow')¬==1 then do
|
||||
say 'RXWINDOW function package not loaded.'
|
||||
exit 13
|
||||
end
|
||||
|
||||
if pcvideo()==3 then normal= 7
|
||||
/*REXX (using PC/REXX) to display a message in a window (which is bordered). */
|
||||
if fcnPkg('rxWindow') ¬== 1 then do
|
||||
say 'RXWINDOW function package not loaded.'
|
||||
exit 13
|
||||
end
|
||||
if pcVideo()==3 then normal= 7
|
||||
else normal=13
|
||||
|
||||
window#=w_open(1, 1, 3, 80, normal)
|
||||
call w_border window#
|
||||
call w_put window#, 2, 2, center("Goodbye, World!", 80-2)
|
||||
call w_border window#
|
||||
call w_put window#, 2, 2, center("Goodbye, World!", 80-2)
|
||||
|
||||
/*stick a fork in it, we're done.*/
|
||||
/*stick a fork in it, all we're done. */
|
||||
|
|
|
|||
|
|
@ -1,26 +1,29 @@
|
|||
/*REXX pgm shows a "hello world" window (& another to show how to close)*/
|
||||
parse upper version !ver .; !pcrexx='REXX/PERSONAL'==!ver |'REXX/PC'==!ver
|
||||
if \!pcrexx then call ser "This isn't PC/REXX" /* is ¬ PC/REXX ? */
|
||||
rxWin=fcnpkg('rxwindow') /*function around?*/
|
||||
if rxWin\==1 then do 1; 'RXWINDOW /q'
|
||||
if fcnpkg('rxwindow')==1 then leave /*function is OK. */
|
||||
say 'error loading RXWINDOW !'; exit 13
|
||||
end
|
||||
top=1; normal=31; border=30; curpos=cursor()
|
||||
width=40; height=11; line.=; line.1='Goodbye, World!'
|
||||
w=w_open(2,3,height+2,width,normal); call w_border w,,,,,border
|
||||
helpLine="press the esc key to quit"
|
||||
helpw=w_open(2,50,3,length(helpLine)+4,normal)
|
||||
call w_border helpw,,,,,border; call w_put helpw,2,3,helpLine
|
||||
/*REXX program shows a "hello world" window (and another to show how to close)*/
|
||||
parse upper version !ver .; !pcrexx= !ver=='REXX/PERSONAL' | !ver=='REXX/PC'
|
||||
if ¬!pcrexx then call ser "This isn't PC/REXX" /*this isn't PC/REXX ? */
|
||||
rxWin=fcnPkg('rxwindow') /*is the function around?*/
|
||||
|
||||
if rxWin¬==1 then do 1; 'RXWINDOW /q'
|
||||
if fcnPkg('rxwindow')==1 then leave /*the function is OK.*/
|
||||
say 'error loading RXWINDOW !'; exit 13
|
||||
end
|
||||
|
||||
top=1; normal=31; border=30; curpos=cursor()
|
||||
width=40; height=11; line.=; line.1= 'Goodbye, World!'
|
||||
w=w_open(2, 3, height+2, width, normal); call w_border w,,,,,border
|
||||
helpLine= 'press the ESC key to quit.'
|
||||
helpW=w_open(2, 50, 3, length(helpLine)+4, normal)
|
||||
call w_border helpw,,,,,border; call w_put helpW, 2, 3, helpLine
|
||||
call w_hide w, 'n'
|
||||
do k=0 to height-1
|
||||
_=top+k; call w_put w,k+2,3,line._,width-4
|
||||
_=top+k; call w_put w, k+2, 3, line._, width-4
|
||||
end /*k*/
|
||||
call w_unhide w; esc='1b'x
|
||||
do forever; if inkey()=esc then leave; end
|
||||
call w_close w
|
||||
call w_close helpw
|
||||
if rxWin\==1 then 'RXUNLOAD rxwindow'
|
||||
parse var curpos row col
|
||||
call w_unhide w
|
||||
do forever; if inKey()=='1b'x then leave; end
|
||||
/* ↑ */
|
||||
call w_close w /* └──◄ the ESCape key.*/
|
||||
call w_close helpw
|
||||
if rxWin¬==1 then 'RXUNLOAD rxwindow'
|
||||
parse var curPos row col
|
||||
call cursor row, col
|
||||
/*stick a fork in it, we're done.*/
|
||||
/*stick a fork in it, we're all done. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue