Sign in to follow this  
Followers 0
ken82m

Idiots Guide To Autoit Gui?

24 posts in this topic

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


My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "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."

Share this post


Link to post
Share on other sites



I like that Idea, maybe a beginers help file as an alternate download.

Starting with "Hello world" and ending up with hotkeys, arrays, ini usage, and parsing downloaded webpages.


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
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 !

Share this post


Link to post
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.


My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "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."

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "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."

Share this post


Link to post
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.

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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=

Share this post


Link to post
Share on other sites

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

Oh, well :D


-= Smudley =-

Share this post


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

Share this post


Link to post
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. :)

Share this post


Link to post
Share on other sites

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


-Brett

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

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

Share this post


Link to post
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 =-

Share this post


Link to post
Share on other sites

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]

Share this post


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

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

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)

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