Xoenix Posted September 10, 2005 Posted September 10, 2005 I have my functions and everything, but I just cant seem to get the GUI under control. I was just a box, with 2 different buttons, one saying on, other off. It would be good if I could be able to load a picture as background to. Thanks heaps for the help!
Danny35d Posted September 10, 2005 Posted September 10, 2005 #include <GuiConstants.au3>GuiCreate("My Switch", 348, 223, 366,266)$n = GUICtrlCreatePic(@Systemdir & "\oobe\images\wpakey.jpg",0,0, 366,266)GuiCtrlSetState($n, $GUI_DISABLE)$Button1 = GuiCtrlCreateButton("On", 80, 72, 57, 33)$Button2 = GuiCtrlCreateButton("Off", 200, 72, 57, 33)GuiSetState()While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 ;On Button MsgBox(0, "", "You press On button.") Case $msg = $Button2 ;Off Button MsgBox(0, "", "You press Off button") Case Else ;;; EndSelectWEndExitI hope this will help you.... AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Xoenix Posted September 10, 2005 Author Posted September 10, 2005 Thanks I think I can get the rest from here If I have problems I'll ask again.
Xoenix Posted September 10, 2005 Author Posted September 10, 2005 Sorry for double post, but how do I a) addd more buttons make buttons wider to fit more text? Appreciated
Danny35d Posted September 10, 2005 Posted September 10, 2005 Sorry for double post, but how do I a) addd more buttons make buttons wider to fit more text?Appreciated <{POST_SNAPBACK}>To add more button you can use:$Button# = GUICtrlCreateButton ( "text", left, top [, width [, height [, style [, exStyle]]]] )where # will be 3, 4, 5, 6, .... GuiCtrlCreateButton create the button that you want "text" inside the quots the message that you wantand then play with the coordenants left is equal X top is equal Y width and height so you can fit more textfor the style and exStyle you will have to look at the help file the are too many..... AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
B3TA_SCR1PT3R Posted September 10, 2005 Posted September 10, 2005 you should download Scite4AutoIt it has a great guibuilder.. you just drag and drop [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now