Jump to content
Sign in to follow this  
qwertylol

GUI newbie tutorial

Recommended Posts

qwertylol

autoit3 is a very good scripting program, yet it's hard to learn how to intergrate the gui created with koda to the core script.

how do I learn to do that ?

Share this post


Link to post
Share on other sites
Valuater

autoit3 is a very good scripting program, yet it's hard to learn how to intergrate the gui created with koda to the core script.

how do I learn to do that ?

do you start with a "core" script or the GUI???

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
qwertylol

do you start with a "core" script or the GUI???

8)

but, to start off, how do I write a [edit box] [ok] button to send the content to a variable?

both, the gui will be event driven, what i need to write is a window with complex functions.

This is what I am trying to do:

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

Share this post


Link to post
Share on other sites
enaiman

For a start you can put Koda to generate advanced code.

Just look in the Tools menu and choose "Advance Generate" - you can see then a couple of options (OnEvent Mode and Generate Events for all controls)


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites
Zedna

autoit3 is a very good scripting program, yet it's hard to learn how to intergrate the gui created with koda to the core script.

how do I learn to do that ?

In Autoit Helpfile look at section "GUI Reference"

there is

- GUI Concepts

- GUI MessageLoop Mode

- GUI OnEvent Mode

Share this post


Link to post
Share on other sites
qwertylol

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

yet another infinite loop !

what if I need to run tcp server and I need an inifite loop for that also?

wouldn't it make the script unresponsive if the server gets busy?

Share this post


Link to post
Share on other sites
qwertylol

how do I create a field where a picture is shown,

and controls to view the picture in different sizes?

like mspaint, you can enlarge part of the photo and then I need the ability to create a drag square to select a area, and then I need to tick off unwanted pixel and then send the rest of the squares from the selected area to a function ?

Share this post


Link to post
Share on other sites
enaiman

yet another infinite loop !

what if I need to run tcp server and I need an inifite loop for that also?

wouldn't it make the script unresponsive if the server gets busy?

Indeed it is an infinite loop but ... that loop is necessary (I can say- essential) because without that loop the script will terminate so fast that you could barely see it.

That loop is a waiting loop - in the case you showed is a loop where your GUI waits for a message in order to do the associated action (message = button press, input changed, checkbox checked/unchecked ...) ... the explanation is: the GUI waits for an action. That is if you need a GUI. If you don't need a GUI but a regular script then you can get rid of that loop - look at the WinZip installer example.

So - to conclude:

- if you need a GUI (Graphical User Interface) - you MUST use an infinite loop

- if you don't need a GUI - then the infinite loop doesn't make sense

What I can tell you - Look a little closer at the help and maybe see and try to understand some simple example scripts.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

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  

×