Jump to content

[...] Isolate variables...


Recommended Posts

Hi !

I would like to take off this expression all variables

CODE
$expression = 'MouseClick("left",$x,$Y,$click)

I have thought of something like this.

CODE
$expression = stringsplit($expression,"$")

it gives an array like that

1 = MouseClick("left",

2 = x,

3 = Y,

4 = $click)

I want now that each string following array[2] to array[0] to be analysed and if symbols "+" "-" "=" ")" or " " to cut

this string down again.

Finally it would give me something like this

2 = x

3 = y

4 = click

The names of my variables

To recapitulate, here's the code I already made

CODE
$expression = 'MouseClick("left",$x,$Y,$click)

$expression = stringsplit($expression,"$")

Now I want to "read the string" stop at those symbols "+" "-" "=" ")" or " " and to return the result of what is between my stringsplit "$" and symbols,

also known as ... variables names found in $expression

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...