Jump to content
PraveenKumarNatarajan

Add operation not supported

Recommended Posts

I am trying to run the calculator standalone application in windows and trying to perform the addition operation by using the following code snippet.

Run("C:\Windows\System32\calc.exe")
WinWaitActive("Calculator")
Sleep(2000)
Send("30")
Sleep(2000)
Send("-")
Sleep(2000)
Send("20")
Sleep(2000)
Send("{ENTER}")
Sleep(6000)
WinClose("Calculator")

But, it is not working. The other operations like subtraction, multiplication and division is working without any issue.

Do we have any other dependency on the addition operation which I am missing?

Share this post


Link to post
Share on other sites

If you read the help file entry for Send, you would find the following --

Quote

'+'
This tells AutoIt to send a SHIFT keystroke; therefore, Send("Hell+o") would send the text "HellO". Send("!+a") would send "ALT+SHIFT+a".

You need to change your Send command to use "{+}" instead. Another option would be to set the optional flag parameter to $SEND_RAW.

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...