I have some numeric strings i want to add and get the final sum, but it can't calculate numeric strings.
Is there a way around it?
How to calculate numeric strings
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: How to calculate numeric strings
Not sure I follow. Macro Scheduler will normally convert from string to numeric automatically. Can you provide an example of the strings and what you want to do?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: How to calculate numeric strings
Wow you're right. Just did this
to confirm what you said, and it works.
I wonder why mine doesn't work then?
I'm trying to count the number of lines in some txt files and add them together.
Here it is
The MDL says 519+655+511+877+247 instead of the result.
The strings are clearly nothing but numbers, so i don't see the difference between my strings and the %A%+%B% i used in my example
Code: Select all
LET>A=1
LET>B=2
LET>SUM=%A%+%B%
MDL SUM
I wonder why mine doesn't work then?
I'm trying to count the number of lines in some txt files and add them together.
Here it is
Code: Select all
ReadFile>\\DSS-DK-FIL-001\Data\Common\Autoclick projekt\Statistik\Grouped Output\Dkpbrsc.txt,DKPBRSC
ReadFile>\\DSS-DK-FIL-001\Data\Common\Autoclick projekt\Statistik\Grouped Output\DKPERNI.txt,DKPERNI
ReadFile>\\DSS-DK-FIL-001\Data\Common\Autoclick projekt\Statistik\Grouped Output\dkjurroh.txt,DKJURROH
ReadFile>\\DSS-DK-FIL-001\Data\Common\Autoclick projekt\Statistik\Grouped Output\dkptana.txt,DKPTANA
ReadFile>\\DSS-DK-FIL-001\Data\Common\Autoclick projekt\Statistik\Grouped Output\DKPTHSK.txt,DKPTHSK
Separate>DKPBRSC,CRLF,DKPBRSC_Arr
Separate>DKPERNI,CRLF,DKPERNI_Arr
Separate>DKJURROH,CRLF,DKJURROH_Arr
Separate>DKPTANA,CRLF,DKPTANA_Arr
Separate>DKPTHSK,CRLF,DKPTHSK_Arr
ArrayCount>DKPBRSC_Arr,DKPBRSC_Count
ArrayCount>DKPERNI_Arr,DKPERNI_Count
ArrayCount>DKJURROH_Arr,DKJURROH_Count
ArrayCount>DKPTANA_Arr,DKPTANA_Count
ArrayCount>DKPTHSK_Arr,DKPTHSK_Count
Let>Collective=%DKPBRSC_Count%+%DKPERNI_Count%+%DKJURROH_Count%+%DKPTANA_Count%+%DKPTHSK_Count%
MDL Collective
The strings are clearly nothing but numbers, so i don't see the difference between my strings and the %A%+%B% i used in my example
- Dorian (MJT support)
- Automation Wizard
- Posts: 1386
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: How to calculate numeric strings
Code: Select all
Let>Collective=%DKPBRSC_Count%+%DKPERNI_Count%
Code: Select all
Let>Collective=%DKPBRSC_Count%+%DKPERNI_Count%+%DKJURROH_Count%+%DKPTANA_Count%+%DKPTHSK_Count%
Even if we use ..
Code: Select all
Let>Collective=%DKPBRSC_Count%+%DKPBRSC_Count%+%DKPBRSC_Count%+%DKPBRSC_Count%+%DKPBRSC_Count%
The first method below can only take two arguments, so try this when adding more than two of them together:
Code: Select all
let>a=1
let>b=2
let>c=3
let>total1=%a%+%b%+%c%
mdl>total1
let>total2={%a%+%b%+%c%}
mdl>total2
Code: Select all
Let>Collective={%DKPBRSC_Count%+%DKPERNI_Count%+%DKJURROH_Count%+%DKPTANA_Count%+%DKPTHSK_Count%}
MDL>Collective
Yes, we have a Custom Scripting Service. Message me or go here
Re: How to calculate numeric strings
It works!
As always, thank you!
As always, thank you!
Re: How to calculate numeric strings
Works for me as well, thanks, I'm really not familiar with numeric strings at all, thanks for helping us newbies.