Macro Toolworks and Perfect Keyboard Forums • How to increase value in variable by 1
Page 1 of 1

How to increase value in variable by 1

Posted: Tue Dec 06, 2016 2:46 pm
by Petr
This example shows how to increase variable value by 1:

Code: Select all

<cmds>
<#>Set initial value to 1
<varset>("v=1","")
<#>Increment the variable by doing + 1
<varset>("v=EXPR(%v%+1)","")
<#>Show expected result v=2
<msg>(-100,-100,"v=%v%","Result",1,0,0,0)

Re: How to increase value in variable by 1

Posted: Tue Jan 09, 2018 9:34 am
by GerritH
Hi Petr,

Thanks, just what I was looking for. I'm new to MTW and are used to working with Quickeys. Could you tell me the way to have the variable read the value from clipboard? I need to have that value increased by 1. I just can't seem to get it right.

Thanks in advance,
Gerrit

Re: How to increase value in variable by 1

Posted: Tue Jan 09, 2018 10:34 am
by GerritH
Oh, got it. Couldn't have done it without your post. Thanks again! :D