Author Topic: "Compute value" not working as expected  (Read 4415 times)

GreyArea

  • Guest
"Compute value" not working as expected
« on: March 17, 2017, 05:23:16 PM »
I am trying to set some tokens for mouse positions. I know that if my first position is (for example) 50, then the next positions I need are 100, 150, 200 (ie X plus 50, X plus 100 and x plus 150)

I can set "x1" to "mousewindowx" no problem.

What I want to do is set "x2" to "x2 plus 50".

However, when I select "compute from value" and enter "x1" into the name box...all it will give me is

x2=x2 plus x1.

When what I want is

x2 = x1 plus 50

What am I doing wrong?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: "Compute value" not working as expected
« Reply #1 on: March 18, 2017, 08:36:38 AM »
Could you right click the action list, then click "Copy All as Text" in the context menu, and paste it here?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2824
Re: "Compute value" not working as expected
« Reply #2 on: March 18, 2017, 01:23:25 PM »
Set decimal [dec1] value to 50
Set decimal [dec2] value to 25
Set decimal [dec3] value to the value of [dec1]
Set decimal [dec3] to [dec3] plus [dec2]

Is it this again, maybe?

GreyArea

  • Guest
Re: "Compute value" not working as expected
« Reply #3 on: March 19, 2017, 09:10:10 AM »
GAry that's pretty much the solution I came up with...just seemed a bit longwinded...

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: "Compute value" not working as expected
« Reply #4 on: March 19, 2017, 10:41:23 AM »
You can have a look at this topic. It contains both Gary's example, and one using "{EXP:}" which is slightly shorter.