BlankMind Posted February 5, 2005 Share Posted February 5, 2005 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. Link to comment Share on other sites More sharing options...
Lazycat Posted February 5, 2005 Share Posted February 5, 2005 You have a look help into Assign function: Assigns a variable by name with the data. Assign ( "varname", "data" [, flag] ) I think, this is what you need. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
BlankMind Posted February 5, 2005 Author Share Posted February 5, 2005 I could not find this function on AutoIT documentation and if I use it AutoIT says it's a unknown function. Link to comment Share on other sites More sharing options...
Lazycat Posted February 5, 2005 Share Posted February 5, 2005 (edited) I'm sorry, forgot to mention that only in beta version :">. You can download it now or wait one-two weeks until version 3.1 will be released. Edited February 5, 2005 by Lazycat Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
BlankMind Posted February 5, 2005 Author Share Posted February 5, 2005 I'll try this now, thank you for supporting. I'm very anxious for a new AutoIT version Link to comment Share on other sites More sharing options...
BlankMind Posted February 5, 2005 Author Share Posted February 5, 2005 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 . 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? Link to comment Share on other sites More sharing options...
zcoacoaz Posted February 5, 2005 Share Posted February 5, 2005 (edited) there is its made by CyberSlug heres the link http://www.autoitscript.com/fileman/users/public/CyberSlug/jan11autobuilder.zip Edited February 5, 2005 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] Link to comment Share on other sites More sharing options...
sugi Posted February 5, 2005 Share Posted February 5, 2005 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 Link to comment Share on other sites More sharing options...
BlankMind Posted February 6, 2005 Author Share Posted February 6, 2005 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now