Jump to content

Idiots Guide To Autoit Gui?


Recommended Posts

I'm still trying to learn this thing I have downloaded the big manual and I'm reading it but I can't seem to make much sense of it.

I guess I'm just an idiot, what else is new lol :D

I am trying the building tools now but they seem to crash a lot. Does anyone have an idiots guide to AutoIT Gui? Maybe it's just the syntax and how to use it.

Perhaps if someone has some sample scripts I can run and examin something a little more complex than just here is the box and type your name :huh2:

Thanks,

Kenny

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to comment
Share on other sites

I think the best way to learn, and the way I learned AutoIt, is to look at some basic examples

and try to understand what every step does. :D:huh2:

And then you can modify the examples, to easier take the leap over from reading scripts

to script yourself.

Then when you've understood the examples and are able to create something similar,

you can try to make some more "advanced" scripts..

If your script fails then study the helpfile, but if you still can't figure it out then

we're glad to help you here at the forum.

Good luck and happy scripting !

Link to comment
Share on other sites

I did some searching and downloaded the latest beta. The help file in it does look alot better. That first sample script with all the controls is interesting I'm going over it now.

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to comment
Share on other sites

I downloaded the latest Autoit3-Gui (102.20) and tried some samples in the help file and I get this message.

GUISetControlEX(-1,$GUI_FOCUS)   ;

GUISetControlEX(-1,^ERROR

Error: Variable used without being declared.

Seems like it doesn't reconize $GUI_FOCUS

What am I doing?

:D

Edited by Smudley
-= Smudley =-
Link to comment
Share on other sites

isn't there an option that controls whether varaibles have to be declared or not? try adding this to the beginning of the script:

$GUI_FOCUS = ""

Edited by ken82m

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to comment
Share on other sites

  • Developers

I downloaded the latest Autoit3-Gui (102.20) and tried some samples in the help file and I get this message.

Seems like it doesn't reconize $GUI_FOCUS

What am I doing?

:D

you need to #include this file: http://www.autoitscript.com/fileman/users/jpm/AutoIt3-gui/gui_include.au3

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I'm using the unstable version (3.0.102) which has the GUI functionality and to use $GUI_FOCUS and other GUI constants, I have to include the following code in my script:

#include <GuiConstants.au3>

The code works if you use the AutoIt installer. If you manually install 3.0.102 using the zip file, you will need to change the code to:

#include "d:\AutoIt3-Beta\Include\GuiConstants.au3"

Where "d:\AutoIt3-Beta" is the directory location where you install AutoIt

Hope this helps!

=MX=

Link to comment
Share on other sites

Thanks, you would figure that AutoIt3-GUI.exe would automatically include that or have it built in.

Oh, well  :huh2:

AutoIt-gui was a pre build before integration which for the time being you find under unstable area.

The constants are not included by default you always need to add

#include <GUIConstants.au3>

and/or #include <Constants.au3>

or more any include located in the AutoIT3\include folder.

Good GUI

:D

Link to comment
Share on other sites

I think the best way to learn, and the way I learned AutoIt, is to look at some basic examples

and try to understand what every step does.  :D  :huh2:

And then you can modify the examples, to easier take the leap over from reading scripts

to script yourself.

Then when you've understood the examples and are able to create something similar,

you can try to make some more "advanced" scripts..

If your script fails then study the helpfile, but if you still can't figure it out then

we're glad to help you here at the forum.

Good luck and happy scripting !

I agree too.

Like the beerman's signature:

If you don't first suckseed. try, try again.
*sukeed
**sucseed
***succeed

Try editing examples and look the behavior. :)

Link to comment
Share on other sites

  • Administrators

Where is everyone finding these examples? I can't find any.

There were a lot of examples with JP's custom build but none in the official "unstable" version yet (hint hint).

Some nicely commented examples of increasing complexity would be cool.

Link to comment
Share on other sites

There were a lot of examples with JP's custom build but none in the official "unstable" version yet (hint hint).

Some nicely commented examples of increasing complexity would be cool.

Definitely.

Found examples in the latest help file of AutoIt.

Edited by SlimShady
Link to comment
Share on other sites

Where is everyone finding these examples? I can't find any.

The examples I've been hacking on are found in the Autoit3-Gui .chm help file.

For example, lookup function GUIRead and then scroll down to the bottom of that topic and you'll see the example. :D

-= Smudley =-
Link to comment
Share on other sites

  • 2 weeks later...

Hi, all!

I'm signing up for the the role as idiot, as well. :huh2:

Yesterday I downloaded AutoBuilder 0.4 found here at the formum.

I've gotta say it looks good, I'm betting I'll find it very usefull as soon as I can get it to work.

....and that's sort of the problem.

When I try to run scripts (not compiled ones) I get an error msg that goes something like this:

GuiCreate("MyGui", 407,320,(@Desktopheight-407)/2, (@DesktopHeight-320)/2, 0x04CF000) ^ERROR

Error: Unknown function name

Of course, GuiCreate(etc....), is the reference to the function that I'm trying to use, and which AutoBuilder has created for me.

Now, from what I gather from the forum, it should be possible to download something called: AutoIt3-GUI.exe

As I understand it, and I might very well be wrong, this little piece of software enables Auto-It to understand a set of functions all starting with GuiSomething

If so, where the hell can I get it??? :D

Help is very much appreciated!

[font="Geneva"]..t.k.[/font]
Link to comment
Share on other sites

That first sample script with all the controls is interesting

I have also downloaded the lastest release and now wondering if I can download the sample mentioned in the quote somewhere.(assuming this is the screenshot Jon has used here and there to illustrate gui's functions)

More perticular I'm looking for an example with a changed color font.

Just like the 'Date control expands in to a calendar ...'

I just can't seem to figure it out myself :D

Link to comment
Share on other sites

GUISetControl("label", "Date control expands in to a calendar...", 1, 30)
   GUISetControlEx(-1,0,0,"",0xff); set text in red

0xff is the new color.

Forgot: the code for the sample is in the help-file too:

Go to:"GUI Reference" -> scroll down to the picture -> and then klick at the end of the line "you can look at the corresponding script" :D

Edited by Holger
Link to comment
Share on other sites

  • Administrators

I'm still a gui novice myself (even though I am modifying the actual code behind the scenes). All the example I'm using are from JP's tests - we need some offical examples doing for the installer.

The code you are interested in is:

GUISetControl("label", "Date control expands in to a calendar...", 1, 30)
    GUISetControlEx(-1,0,0,"",0xff)

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...