Converting Numerical String Input to Numerical Integer

Advanced Macro Recorder/Editor.

Moderator: Pulover

Bongskie_26
Posts: 3
Joined: 19 Jan 2021, 12:42

Converting Numerical String Input to Numerical Integer

Post by Bongskie_26 » 15 Jan 2022, 01:16

Hi Guys,

Good day!

Newbie here.

I have a simple problem but cannot find the right way to solve it. :( I would like to seek insights from you.

Steps done:
1. I have a numerical string input to add or evaluate, stored them in clipboard. ("123 + 456").
2. I used String Split function to separate them by space and store in array "str". Hence, str1 = "123", str2 = "+", str3 = "456".
3. Then, I adding str1 and str3 by, sum:=str1+str3
4. Showing them in message box. Expected answer is 579 but getting "123456" as output. It was working before but when I tried to run again it is concatenating str1 and str 3 and not adding them.

How can I force to change the value of str1 and str3 as numerical integer from string type? Is there any clever way to solve above simple addition statement using PMC gui?

Thanks so much, Enroublem.

Return to “Pulovers Macro Creator”