Jump to content

variable as a variable's name?


magaf
 Share

Recommended Posts

thanks for responding through im yet to find a solution for what i ment, the variable content is unknown (the reason i want to make variable (ehich will refer to its content) as a variable's name) so i cant use assign

Link to comment
Share on other sites

variable as a variable's name

<{POST_SNAPBACK}>

$x = "abc"
Assign($x, $x)
MsgBox(0, "", Eval($x))

As Cyberslug, you need the latest unstable version to make it work.

Available below.

http://www.autoitscript.com/autoit3/files/unstable/autoit/

Edit 1:

Made a good example.

Edit 2:

I just checked your first post...

Here's the working version of your example.

$x = "abc"
Assign($x, "def")

var $abc contains "def" (without quotes)

Edited by SlimShady
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...