Sign in to follow this  
Followers 0
DEVVED

Arrays and Loops

6 posts in this topic

I was wondering if there was a way to do a loop using arrays so when your last array is used the loop stops?

Share this post


Link to post
Share on other sites



Dim $a_array[5] = ["My", "array", "test", "with", "loop"]

For $x = 0 To UBound($a_array) - 1
    MsgBox(0,"Array: " & $x, $a_array[$x], 3)
Next
oÝ÷ ÚÚºÚ"µÍ[H   ÌÍØWØ^HHÝ[ÔÜ]
    ][ÝÓ^H^HÝÚ]ÛÜ ][ÝË  ][ÝÈ  ][ÝÊBÜ   ÌÍÞHHÈPÝ[
    ÌÍØWØ^JHHBSÙÐÞ
    ][ÝÐ^N    ][ÝÈ  [È ÌÍÞ  ÌÍØWØ^VÉÌÍÞKÊB^ÈÜÜ  ÌÍÞHHÈ  ÌÍØWØ^VÌBSÙÐÞ
    ][ÝÐ^N    ][ÝÈ  [È ÌÍÞ  ÌÍØWØ^VÉÌÍÞKÊB^

etc... and so on.... it's all in the help file


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Besides the help file are there any good resources that explain in great detail how Arrays are sorted, searched, as I found a great example of an idea/code that I would or could not ever preceive - you know what I mean, a 101, 102,201,301 classes or tutors on arrays and loops ?


All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

Not sure what your asking for so I just provide a link to a tutorial.

I am asking how you thought of the concept of doing what you did.

I know that most of the people that attemp to program on this and other forums are either programmers or wantabees or noobes. Most are the two latter. I want to understand what you did and want to be able to do it in my own code - I'm a wantabee/noobe. But how do I do something that I cannot think about unless I see other examples of code and read and read and read through it just to understand one part and then continue to break it down for hours - your code you posted, I have still to totally understand it after a couple of hours of breaking it down. By the way I did steal your program style (;NOTE: & ;TODO: and I really like the way you used a simple Local variable to debug - I learned an easier way.

I want to know if anyone knows a tutorial or website (maybe the 'white pages') that explains arrays and how to use them in great detail, with lots of examples (not really coding examples but the ideas so that I can really understand them). I have started on this forum and have read a lot about them, but would never have been able to write what you did. And the reason for my request - So I can understand your code without spending hours trying to understand it.

I am sorry about the long winded reply.


All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

@nitekram,

The consept is based on experience and studying. I have lots of books regarding computers and programming. I don't bother so much about the new ones (to expencive). Get second hand books if you can. Atleast when it comes to programming and theory. Everything was discussed and thoughtof in the 60s. So any book written after 1975 does contain valuable information. Those written in the 90s are easier to read and understand as they tend to be less academic. Any book with algorithm in the title probably has some value to you untill you can look at the index and recognice 80% of the consepts listed. When that said. I'm still learning and probably will for the rest of my life. Partly because I forget. Partly because my brain ain't AI like, as some others have.

The link I provided in a previous post is a introduction to arrays in AutoIt.

Happy scripting..:)

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