Jump to content
Sign in to follow this  
NeverGiveUp

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

Recommended Posts

NeverGiveUp

$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
SublimePorte

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
Malkey

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.