Jump to content
Sign in to follow this  

assigning a variable with a number from a string..

Recommended Posts

god i'm embarressed to ask this, but what is the correct way to assign a string to another string along with a variable..


lets say i have a do until loop running, and I need to make an undetermined amount of strings...

so.. like..

$string & $number = $data


$string[$number] = $data

or how would you do this? I need to read the strings later but i don't want to have to put all the info in like a text box or something outside of the gui..

Edited by Bi0haZarD

Share this post

Link to post
Share on other sites

You should use an array, for example

#include <Array.au3>
Dim $avArray[10]
for $i = 1 to 9
  $avArray[$i] = "blah"

To realize a dynamic array with a unknown number of entries you have to resize the array at runtime using ReDim.

Best regards,


It's my job to comfort the disturbed and to disturb the comfortable.
My Projects: Profiler, MakeSFX, UserInfo, Simple Robocopy Progressbar

Share this post

Link to post
Share on other sites

What you're asking for in your first post, you can do with Assign.

Assign("sec_" & @SEC, "whoah")

But as Marc suggested, it's probably best to use an array...

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...