Jump to content
Sign in to follow this  
niubbone

Help starting with autoit

Recommended Posts

niubbone

Hi all.

I am trying from 2-3 days to get familiar with and to learn autoit, but I am not succeding in it.

I know 2-3 days are a relatively short time. I am reading lot of tutorials around the internet and i was a bit familiar with programmation and some programmation languages. I have learnt Pascal and Html myself some years ago and liked to play with Javascript (which i never learnt). Therefore I already know something about how to program and so on, but very little. On all the guides I found I read about Variable declaring, Msg boxes, arrays, cicles like If-Then, Do Until, While, GUI, macros and so on and I learn how they work and how they should be used. Not a deep knowledge but, sufficient for doing little useless programs. I'll post some examples of codes I tried to make to exercise. After all of this, I'm finding hard how to build up an useful program. This is my problem: I have learned that i have all these tools (calling tools the various functions of autoit, the cycles if, do, while, the macros, and all these things) but i can't use them togheter. It's like to have sculptor tools in your hands but you don't know how to make a statue..... I know how these things work, but i can't put up anything decent...

My main aim with autoit was doing bot for games or to automate tasks in windows, the second but not less important aim is to learn with the time and the exercise, to use AutoIT in every aspect, and for any use i need, building each time more complex programs. Then when i have learned Autoit in a proper manner, i would like to switch to c++, availing of the precedent experience acquired with autoit (i previously tried to learn c++ myself but i got as far as autoit, building simple programs). Therefore, THIS IS MY QUESTION:

1)I have learned how to use base instructions, constants, variables, arrays, cicles, macros, GUI

2)I made some simple programs

How i learn to make more complex programs? The other commands and so on?

Should i have to come here and look to other people source code till i learn it myself? Should i say: I want to make this program and i try to make it till i don't succeed? HOW PLEASE?...

These are a couple of the little programs i made.

This calculates the result of Pythagoras' theorem (quickly translated in english):

MsgBox(1,"Pythagora's theorem", "Program to calculate the result of Pythagora's theorem")
$a=InputBox("Cateto a", "Input A")
$b=InputBox("Cateto b", "Input B")
$c=Sqrt(($a^2)+($b^2))
$ca="A is"
$cb="B is"
$cc=Hypotenuse is"
sleep(500)
MsgBox(0,"Result",$ca & " " & $a & " " &@CRLF & $cb & " " & $b & " "&@CRLF & $cc & " " & Round($c))

Another project i was trying to complete and in which i am little stuck, is a program to solve quadratic equations.

Just in case you need:

Rules of quadratic equations

This is the source. It's incomplete and not working, but it's made in an afternoon, so i have to work on it some days, also because i'm not very good at math... theeheheee :mellow:

I've not translated this, if needed ask and i will.

#cs
Diagramma di lavoro
forma base ax^2+bx+c=0
Input variabili a b c

caso 1 Se b=0 e c=0 e.monomia
caso 2 se c=0 spuria
caso 3 se b=0 pura
caso 5 nessun elemento =0 completa

caso 1
ax^2=0 --> x^2=0/a quindi x=0 il risultato è sempre 0



#ce
$a=InputBox("Incognita a", "Inserire il valore dell'incognita a")
$b=InputBox("Incognita b", "Inserire il valore dell'incognita b, 0, se nulla")
$c=InputBox("Incognita c", "Inserire il valore dell'incognita c, 0, se nulla")

Select
Case $a=0 And $b=0 And $c=0 ;caso nullo, se l'utente immette tutti 0
    MsgBox(0,"Risultato nullo","L'equazione è nulla")
Case $a<>0 And $b=0 And $c=0 ;monomia b=0 c=0
     MsgBox(0,"Equazione di Secondo Grado Monomia","X è uguale a 0")
Case $a<>0 And $b<>0 And $c=0 ;spuria c=0 ARROTONDARE CON ROUND
     $risspuria=-$b/$a
     MsgBox(0,"Equazione di Secondo Grado Spuria", "X1 è uguale a 0, X2 è uguale a " & Round($risspuria,2)
 Case $a<>0 And $b=0 And $c<>0 ;pura b=0
     $rispura=Sqrt(-$c/$a)
     MsgBox(0, "Equazione di Secondo Grado Pura", "X1 è uguale a " & Round($rispura,2) &@CRLF & "X2 è uguale a " & Round($rispura,2)
     EndSelect

So, what i have to do to learn it? I need someone to help me, to guide and tell me what i can do now....

Thanks for the help.

Share this post


Link to post
Share on other sites
Melba23

niubbone,

Welcome to the AutoIt forum. :mellow:

As a newcomer to Autoit, have you looked at the excellent tutorials that you will find here and here? They will give you a solid grounding in all aspects of AutoIt scripting.

Your imagination is the only limit when you are deciding what to do next. We are here to help you solve problems that you encounter when trying to script in AutoIt, but we are not really in the business of handing out assignments. :lol: I suggest that you look at some of the scripts posted by the more experienced coders in the forum and see if you can get some inspiration from there. You will find all sorts of scripts, dealing with graphics, messaging, file management, music players....I could go on for hours.

So, go and work through the tutorials and then see what you can find to stimulate your imagination - it will not be hard. :(

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
niubbone

niubbone,

Welcome to the AutoIt forum. :mellow:

As a newcomer to Autoit, have you looked at the excellent tutorials that you will find here and here? They will give you a solid grounding in all aspects of AutoIt scripting.

Your imagination is the only limit when you are deciding what to do next. We are here to help you solve problems that you encounter when trying to script in AutoIt, but we are not really in the business of handing out assignments. :lol: I suggest that you look at some of the scripts posted by the more experienced coders in the forum and see if you can get some inspiration from there. You will find all sorts of scripts, dealing with graphics, messaging, file management, music players....I could go on for hours.

So, go and work through the tutorials and then see what you can find to stimulate your imagination - it will not be hard. :(

M23

Thanks, this message is a great input to me. At least i know what to do now. I'll try to look to other script and see how they do "this and that". I'll read both the guides aswell. Many thanks ;D Once I'll get into autoit I'll give back the favor helping newcomers :P I hope that day will come soon.

(Sry for bad english, but i'm not native)

Share this post


Link to post
Share on other sites
Melba23

niubbone,

Your English is fine. :mellow:

Once I'll get into autoit I'll give back the favor helping newcomers. I hope that day will come soon

I am sure it will.

Buona fortuna. :(

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Fulano

Something that's always helped me is to find something specific that you need to do, that way you have something to focus your learning on - and it'll provide direction.

All the best programming/scripting classes are based on massive numbers of exercises for a reason :mellow:

That being said, you might want to learn c++ first, that way you won't have to 'unlearn' all the bad habits you pick up in scripting languages

<disclaimer>I love AutoIt and scripting in general, but scripting languages do tend to encourage lazy code</disclaimer>


#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

Share this post


Link to post
Share on other sites
JohnOne

Its like a problem, or indeed a goal.

You need to know what you want to do, then break it down into smaller problems/goals (functions).

Its a lot of fun most of the time for me, just as a hobby.

And it keeps me out of the alehouse. :mellow:

Have fun, and good luck.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
niubbone

niubbone,

Your English is fine. :mellow:

I am sure it will.

Buona fortuna. :(

M23

Grazie. You speak italian?

Something that's always helped me is to find something specific that you need to do, that way you have something to focus your learning on - and it'll provide direction.

All the best programming/scripting classes are based on massive numbers of exercises for a reason :lol:

That being said, you might want to learn c++ first, that way you won't have to 'unlearn' all the bad habits you pick up in scripting languages

<disclaimer>I love AutoIt and scripting in general, but scripting languages do tend to encourage lazy code</disclaimer>

I perfectly understand your point of "lazy coding" and so on, but i need to start with something easier. If i could attend a course of c++ i would start with it with no problems...

Share this post


Link to post
Share on other sites
Fulano

::nod:: without access to a classroom, life gets much more difficult :( good luck on your path to coding nirvana :mellow:


#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

Share this post


Link to post
Share on other sites
niubbone

Since when I posted, many progress has been done. Thanks guys. I'll post more about my works soon.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.