Sign in to follow this  
Followers 0
BlankMind

A question

9 posts in this topic

Well, I want to add a numeric prefix on my variables, I mean:

I want to make $name1, $name2, $name3 and etc until a limit, but I don't want to have to change the program every time I want to change the limit. I would like to do something like this, if I want to put "test" on a lot of variables (10) $name.

$number = 1
While $number <= 10
$name(here's go the variable $number) = "test"
$number = $number + 1
WEnd
Exit

What I can't do is put a variable to make the name of another variable, okay? Something like $name$number, or $name($number), or $name & $number, I don't know how to do that.

I think I was able to explain what is my problem. I'm waiting for some help, thank you.

Share this post


Link to post
Share on other sites



I could not find this function on AutoIT documentation and if I use it AutoIT says it's a unknown function.

Share this post


Link to post
Share on other sites

I'll try this now, thank you for supporting. I'm very anxious for a new AutoIT version :lmao:

Share this post


Link to post
Share on other sites

Wow, GUI creating of beta AutoIT is really impressing and some new functions or remade functions are very cool. Assign is the command I need man, thank you, and new Random (that can create integer numbers now) is great too, I don't know how I didn't know that this great beta exists :lmao:.

And I'm learning how to use GUI now and I'd like to ask if there isn't a program to make easier the work of sizing and placing buttons. There is?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

there is its made by CyberSlug heres the link http://www.autoitscript.com/fileman/users/public/CyberSlug/jan11autobuilder.zip

Edited by Xenogis

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites

What I can't do is put a variable to make the name of another variable, okay? Something like $name$number, or $name($number), or $name & $number, I don't know how to do that.

That's what arrays are for:
$maxnum = InputBox('Maximum number', 'Maximum number')
dim $name[$maxnum]
for $i = 0 to $maxnum - 1
    $name[$i] = "test" & $i
Next
For $i = 0 to $maxnum - 1
    MsgBox(0, $i, $name[$i])
Next

Share this post


Link to post
Share on other sites

there is its made by CyberSlug heres the link http://www.autoitscript.com/fileman/users/public/CyberSlug/jan11autobuilder.zip

<{POST_SNAPBACK}>

Wow, AutoBuilder is really great! I'll send a message of thanks to this guy later, and thank you for tell me about this program.

That's what arrays are for:

$maxnum = InputBox('Maximum number', 'Maximum number')
dim $name[$maxnum]
for $i = 0 to $maxnum - 1
    $name[$i] = "test" & $i
Next
For $i = 0 to $maxnum - 1
    MsgBox(0, $i, $name[$i])
Next

<{POST_SNAPBACK}>

Yesterday I found out about arrays when I used MouseGetPos() and it solves my problems too, using Assign solves my problem too...

Thank you two for helping.

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