Jump to content
Sign in to follow this  
Drakthor

GUI for Idiots

Recommended Posts

Drakthor

I was going to write a gui script to make a data base and have buttons to click to go to a new window but i dunno how? any one know where to find some easy tuts on buttons and GUIs

Share this post


Link to post
Share on other sites
BrettF

I was going to write a gui script to make a data base and have buttons to click to go to a new window but i dunno how? any one know where to find some easy tuts on buttons and GUIs

Koda For Dummies:

  • Open SciTe
  • Goto Tools
  • Run Koda
  • Create Your GUI
  • Goto Tools --> Generate and Click Ok
The End of Koda for Dummies :shocked:

Share this post


Link to post
Share on other sites
Paulie

I was going to write a gui script to make a data base and have buttons to click to go to a new window but i dunno how? any one know where to find some easy tuts on buttons and GUIs

You're best bet would probably be to ask a more specific question here, and people would be happy to assist you :shocked: Edited by Paulie

Share this post


Link to post
Share on other sites
hmsSurprise

After I whined about needing GUI examples I pulled my head back out where the sun shines and found some examples that the installation process provided.

C:\Program Files\AutoIt3\Examples\GUI

Also, as a friend just pointed out to me: Go to your local copy of AutoIt Help (should be a yellow ? icon that the install created), Contents tab, scroll down to GUI Reference. Also under Function Reference, GUI Reference.

Be patient, I find more stuff every day, especially with a little help from the forum.

jh

Share this post


Link to post
Share on other sites
Paulie

After I whined about needing GUI examples I pulled my head back out where the sun shines and found some examples that the installation process provided.

C:\Program Files\AutoIt3\Examples\GUI

Also, as a friend just pointed out to me: Go to your local copy of AutoIt Help (should be a yellow ? icon that the install created), Contents tab, scroll down to GUI Reference. Also under Function Reference, GUI Reference.

Be patient, I find more stuff every day, especially with a little help from the forum.

jh

Your friend is a keeper.

Share this post


Link to post
Share on other sites
Drakthor

I couldnt find the KODA thing but i looked in help file

BUT>>>> I get an error i dunno how to fix

heres my code and the error says my wend statements dont have matching while statements

CODE
#include <GUIConstants.au3>

GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered

Opt("GUICoordMode",2)

$Button_1 = GUICtrlCreateButton ( "Smoke Color", -1, -1)

$Button_2 = GUICtrlCreateButton ( "Fire Color", 0, -1)

GUISetState ()

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $Button_1

GUICreate( "Smoke Color")

Opt("GUICoordMode",2)

$Button_1 = GUICtrlCreateButton( "White", -1, -1)

$Button_2 = GUICtrlCreateButton( "Green", 0, -1)

$Button_3 = GUICtrlCreateButton( "Red", 1, -1)

GUISetState ()

While

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $Button_1

MsgBox( 0, "White", "Potassium nitrate - 4 parts Charcoal - 5 parts Sulfur - 10 parts Wood dust - 3 parts")

Case $msg = $Button_2

MsgBox( 0, "Green", "Synthetic indigo - 26% Auramine (yellow) - 15% Potassium chlorate - 35% Lactose - 26%")

Case $msg = $Button_3

MsgBox( 0, "Red", "Potassium chlorate - 15% para-nitroaniline red - 65% Lactose - 20%")

WEnd

Case $msg = $Button_2

GUICreate( "Flame Color")

Opt("GUICoordMode",2)

$Button_1 = GUICtrlCreateButton( "White", -1, -1)

$Button_2 = GUICtrlCreateButton( "Green", 0, -1)

$Button_3 = GUICtrlCreateButton( "Red", 1, -1)

$Button_4 = GUICtrlCreateButton( "Blue", 2, -1)

$Button_5 = GUICtrlCreateButton( "Yellow", 3, -1)

$Button_6 = GUICtrlCreateButton( "Orange", 4, -1)

$Button_7 = GUICtrlCreateButton( "Purple", 5, -1)

GUISetState()

While

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $Button_1

MsgBox( 0, "White", "magnesium sulfate, epsom salts, found on laundry aisle or in a pharmacy")

Case $msg = $Button_2

MsgBox( 0, "Green", "barium salts, such as barium nitrate")

Case $msg = $Button_3

MsgBox( 0, "Red", "strontium salts, most easily found in road flares")

Case $msg = $Button_4

MsgBox( 0, "Blue", "copper chloride")

Case $msg = $Button_5

MsgBox( 0, "Yellow", "sodium nitrate")

Case $msg = $Button_6

MsgBox( 0, "Orange", "calcium chloride, laundry bleaching agent")

Case $msg = $Button_7

MsgBox( 0, "Purple", "potassium permanganate, used in water and sewage treatment")

WEnd

EndSelect

Wend

Share this post


Link to post
Share on other sites
Zedna

Koda is your GUI friend, trust me!

Koda is at location: "C:\Program Files\AutoIt3\SciTE\Koda\fd.exe"

As bert said you can run it from Scite: menu Tools/Koda

You can find it also on this forum:

http://www.autoitscript.com/forum/index.php?showtopic=32299

http://www.autoitscript.com/fileman/users/lookfar/formdesign.html

Edited by Zedna

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×