Core Function GUICreateButton
From Sputnik Wiki
GUICreate( "Button", <gui object>, <Text>, <Left>, <Top>, <Width>, <Height> )
Contents |
Description
Create a Button
Parameters
gui object
The GUI object to place the button on.
text
The text the button should display.
left
LEFT Position to create the object.
top
TOP Position to create the object.
width
Optional; The width of the object.
height
Optional; The height of the object.
Return Value
Success: Returns the new GUI object.
Failure: Returns 0 if error occurs.
Example
// Create the GUI $GUI = GUICreate("Window", "Hello", 200, 200); // Show the GUI GUILoad( $GUI ); // Create a button -- This button will simply display a message $Button = GUICreate("Button", $GUI, "Press Me!", 8, 8); // Add a link to the button GUILink($Button, "Click", 'Moo();'); // Call function // Keep the GUI running as long as long as the window is open While ( GUIStatus( $GUI ) ) DoEvents( ); Function Moo() { MsgBox("Moo moo farm"); }