Hazel script to sum expenses help

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Hazel script to sum expenses help Thu Aug 08, 2013 9:37 am • by r.f.irish
Thanks in advance for any advice you have to share.

I have been trying to write a script into Hazel to sum the numbers in a text file. I don't have much experience and have tried a lot of different solutions in both bash and Applescript without any results.

Here is an example text file from which I would like to add the numbers preceded by ": $"

**15.44.04**
x
Art materials
: $9

Transport
: $4.50

**15.44.21**

Art materials
: $18

Art materials
: $25

Food
: $11.50

**20.03.53**

Miscellaneous
: $20

**20.04.02**

Food
: $10

I woiuld like to append the text "**Total: " with the sum of the values to the end of the file.

Is something like this possible using bash or Applescript?

Thanks again,

Robert
r.f.irish
 
Posts: 2
Joined: Thu Aug 08, 2013 9:35 am

Re: Hazel script to sum expenses help Thu Aug 08, 2013 2:11 pm • by Mr_Noodle
Please don't post questions in the Tips forums. As indicated by the sticky article up top, that forum is for people sharing tips, not asking for them.

Unfortunately, this type of thing is beyond the support I can give but hopefully one of the many scripters here can help you.
Mr_Noodle
Site Admin
 
Posts: 11551
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Open Discussion