You have to login in order to post a reply to this topic.

3 replies [Last post]
pctone
User offline. Last seen 1 year 46 weeks ago. Offline
Joined: 12/01/2009
Posts: 3

Dear All,

I have really newbie on WinAutomation. Now I try to write some sample code to test it.

'Set Variable' %no1% = 50

'Set Variable' %no2% = 200

'Set Variable' %no3% = %no2% - %no1%

But the WinAutomation set the "%no3" in Text Value format. So the %no3% show in "200-50", not equal to 150

Any suggestions are really appreciatie.

 

 

 

 

 

 

D.M.Altizer
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 01/12/2010
Posts: 204
Re: Number operation problems

Instead of writing: %no2% - %no1% try writing %no2- no1%. This should solve your issue. You can apply the same notation to all numerical operations

__________________

==Dedicated Automation Solutions==

__________________

==Dedicated Automation Solutions==

pctone
User offline. Last seen 1 year 46 weeks ago. Offline
Joined: 12/01/2009
Posts: 3
Re: Number operation problems

Thanks a lot. It's work now.

tonywinauto
User offline. Last seen 41 weeks 3 days ago. Offline
Joined: 04/12/2010
Posts: 20
Re: Number operation problems

 thanks I struggled with this for quite some time.  I had a text string and I wanted to strip-off the final character.  I used a variable to store the length of the string and stored the value '1' in another variable %var1% - %var2% does not work!