Thread: Using Automator
04-25-2013, 11:14 AM #1
- Member Since
- Dec 19, 2012
I've been trying to get Automator to do a series of tasks for me but I'm having some difficulty and I've hit a brick wall. Here is what I would like to do:
I get mails from a website where my students do grammar quizzes and the mails are exactly like this:
The A vs. An Quiz 2 was completed by Ray Stevens:
Final Score: 10/10
What I currently do manually is input this data in a simple numbers spreadsheet with the following columns:
NAME; QUIZ; DATE; RIGHT ANSWERS; TOTAL QUESTIONS; % (formula)
I then wait til a student has about done about (another) 10 quizzes and then send them a normal bar chart showing the names and results of each test they have do so far.
This is all quite simple, but as the number of students increases, it takes up more and more of my time. I would therefore like to try to automate this task, meaning get Automator to:
Find the respective mails in the Mail programme,
Copy/export/steal/borrow the info that should go into the numbers spreadsheet,
(if possible) Send my students an email with a graph of their results.
Any and all help would be greatly appreciated :-)
04-26-2013, 10:08 AM #2
I have a pretty fair grasp of Automator, but this seems beyond what it can do. Perhaps not beyond it, but insidiously complex and highly prone to errors. Here's a rudimentary idea of what I think the workflow would have to do:
- Copy contents of email.
- Paste into a text editor (i.e. TextEdit).
- Find the text " was completed by " (no quotes, with those spaces) and insert a RETURN character to put the name on a new line.
- If desired, also strip the first four characters of the first line so that "The A vs..." field now says "A vs ...".
- Find the text "Final Score: " and strip that.
- Find the "/" character, strip it and insert a RETURN character.
- Find the text "Student Comments:" and strip that.
Once done, you should have five lines of text matching what your spreadsheet column entries would be, though not in your preferred order. From here, the question is how to put it in the spreadsheet itself. That's a whole new challenge. I'm not familiar with Numbers and I haven't even used spreadsheet software in a couple decades, but you could probably continue to modify those lines above so that they are "tagged" as belonging to a specific column using XML code, then save it as an XML file and import it to Numbers.
There ultimately "may" be a better solution from this website that sends you these results. They should already have all this data available in a format that Numbers could import directly. Your email is simply a human-readable report of that database's output, similar to what you could set Numbers to generate (I assume). Is there any chance you can have the website start sending you these results in an XML file instead? That would greatly simplify things.
EDIT: Besides Automator, there are other macro tools available that can pull off feats like these. Keyboard Maestro in particular is especially good and more capable than Automator in some ways.
Please verify and include the exact model/year of your Mac and OS X version number (available from "About This Mac", then "More Info" on the Apple menu).
Links: Onyx | EasyFind | Apple Hardware Test | How to test your hard drive | The Safe Mac » Adware Removal Guide | Uninstall MacKeeper
Lifeisabeach - Mac-Forums Member of the Month June 2009, Feb 2012, and March 2013.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By TyVega in forum Switcher HangoutReplies: 0Last Post: 05-29-2012, 09:45 AM
By SeekingWisdom in forum OS X - Apps and GamesReplies: 1Last Post: 03-07-2012, 02:29 AM
By p605 in forum OS X - Apps and GamesReplies: 0Last Post: 08-26-2011, 02:04 PM
By MartinS in forum OS X - Apps and GamesReplies: 0Last Post: 04-05-2011, 07:51 AM
By jspots in forum OS X - Operating SystemReplies: 0Last Post: 10-24-2008, 03:38 AM