Learning Applescript advice

Hey all

My old man has asked me to learn applescript to write a script for his medical practice… i have only basic high school IT programing knowledge but i was wondering if someone could point me in the right direction

Need to:

  • Take text from a pathology results email (its in exactly the same ascii format each time)
  • Store results in variables
  • Add those to a database in filemaker pro

i was wndering if applescript is the best tool for such a job, and if so what should be the basic process (ie. copy text into a scriptable text editor or can i do it straight from email?) Im running OS 9.1

Thanks alot

Howdy. Whenever my son referred to me as his old man, I took him out behind the barn and put some old man hurtin’ on him. :wink:

This is exactly the type of task that AppleScript is used for. Which email program will be used for this task?

– Rob

outlook v5

Sorry, I don’t have Outlook. Hopefully someone else can help.

– Rob

You can attach a simple script to a rule in Outlook (I don’t use Outlook, but syntax is pretty similar to Entourage)…
pseudo-code:

tell app "Outlook"
	set currentMsgs to current messages
	set currentMsg to item 1 of currentMsgs
	set msgSource to source of currentMsg --> or "content of currentMsg", for the body
end tell

tell app "FMPro"
	tell database 1
		make new record
		set cell "x" of result to msgSource
	end
end

thanks mate, ill give it a shot