Sign in to follow this  
Followers 0
NeverGiveUp

How do i use a string as a function/code?

3 posts in this topic

#1 ·  Posted (edited)

$Variable = Example (MsgBox,16,$Var1,$Var2)

Data extracted from resource is stored in $Variable

Main Script Example:

Func Test($Var1,$Var2)

$Variable

EndFunc

This does not work... The variable is a string so how can make the string the actual code instead?

Edited by NeverGiveUp

Share this post


Link to post
Share on other sites



I don't think it's very clear what you want to do..

The code you've posted doesn't make sense, and certainly isn't runnable.

Like to try and clarify a bit more?

Share this post


Link to post
Share on other sites

Maybe something like this.

Global $Variable = "MsgBox(16,$Var1,$Var2)"
Local $sStr1 = "Test Example", $sStr2 = "Press OK to finish test."

Test($sStr1, $sStr2)


Func Test($Var1, $Var2)
    Execute($Variable)
EndFunc   ;==>Test

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