Jump to content

Button's and their glory


corey822
 Share

Recommended Posts

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

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

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
Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...