Sign in to follow this  
Followers 0
corey822

Button's and their glory

6 posts in this topic

What are some functions that auto it GUI can do?

And also how to apply these to button's?

mainly how to execute a program from a button :P

Please fill me wiht you knowledge lol :(

cheers C.W


C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Share this post


Link to post
Share on other sites



102 posts and you ask a question like that.... :P

Maybe you should take a look at "Welcome to Autoit 1-2-3" in my signature below

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

haha how did i know that question would come up :S lol

ummm Well i started coding in autoit ummm abit back then gave up on all coding after finding myself never getting any further lol

now im back for another shot and i need to re-learn wat i learnt....

haha and i jsut dld'ed ur autoit 1.2.3 just before coming back to read this post :idea:

lol this thing better help or else :P

i kid i kid

anyway's im back to the noob status :(

owell.... :)

cheers C.W


C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Share this post


Link to post
Share on other sites

Yep jsut finished ur tutorial and passed all the quizzes

Yet it didnt asnwer my question lol

would u like to feel me..... in lol

cheers C.W


C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

In SciTe, go to Tools -> Koda(FormDesigner).

You can create your GUI there, press Generate Code when you're done.

Then, you'll have to write some code that should be executed when the button is pressed.

Here's a very basic example:

;Koda will create your GUI, you just have to write the code that should be executed when
;a certain button is pressed. ( See below ).

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$NotepadStarterGUI = GUICreate("Notepad Starter", 257, 128, 193, 115)
$NotepadButton = GUICtrlCreateButton("Run Notepad", 8, 64, 241, 49, 0);This button should do something
$Explanation = GUICtrlCreateLabel("Press the button below to run Notepad.", 8, 16, 235, 41)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $NotepadButton; In case $NotepadButton is pressed
        Run("Notepad.exe"); Notepad will be executed
    EndSwitch
WEnd

Good luck, and stop typing "lol" after every sentence.

Edited by nf67

Share this post


Link to post
Share on other sites

sorry m8 just a force of habbiting in typing "lol".

I figured this out a couple of hour's ago

Case $button1

Run("cmd.exe")


C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

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  
Followers 0