Identifying app by creator code??
Identifying app by creator code??
- Subject: Identifying app by creator code??
- From: Michael Kern <email@hidden>
- Date: Wed, 3 Jan 2001 15:31:29 -0500
I am creating a script in Filemaker Pro 4 that will automatically
generate an email in Outlook Express 5. Yes, I know that Filemaker Pro
can send mail but we have a need to maintain a record of the email in the
person9s email client rather than in Filemaker Pro. So this is how I have
to do this.
I am trying to create a script that references Outlook Express by its
creator code instead of by its name. I have many users in my office &
they tend to move their applications around their hard drives. I don9t
want the 3please find application xxxx2 dialog box to come up when the
user clicks the button, so I am using this method.
I found a script template at
http://members.tripod.co.uk/scripting/applescript/doubletell.html
Basically the script goes like this:
set ename to "Michael"
set eaddress to "email@hidden"
set creaType to "MSNM" Outlook9s creator code
tell application "Finder" to open application file id creaType
the following sets Outlook Express to the variable appOE as an
application
tell application "Finder" to the first process whose creator type is
(creaType as type class)
set appOE to the result as +class psn ;
tell appOE
make new draft window with properties {to recipients:ename & "<" &
eaddress & ">"}
end tell
The problem is the script won9t compile this way. I keep getting an error
at the 2nd to last line 3make...2 on the word window.
When I create a script that references the app by name it works just as
it should:
tell application "Outlook Express"
make new draft window with properties {to recipients:ename & "<" &
eaddress & ">"}
end tell
I can9t get the reference to create a new draft window. When I look at
the Event Log & Result for each script (I changed the make...9 step to
activate9 so it would compile & run), they appear identical. I9ve tried
changing words (window to message to outgoing message; make to create)
and regrouping them using ( ) even changing the word order but the Check
Syntax always get hung up on at least one word (ie removing the word
window9 from the 9make...9 step just stops it on the word to9 in the
properties section on the same line).
Does anyone have any idea why this is happening or how to get this to
work?
Thanks in advance.
Michael Kern
Technologic Partners
(212) 343-1900 x116
email@hidden