Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Using applescript to get iCal to open a file

I'm trying to use AppleScript to get iCal to open a Word doc at a specified date/time.


As a complete novice to AppleScript, I'm sure I have misunderstood how the syntax and grammar of the language work. Would you please advise me how to change this script --

set filepath to POSIX path of "Microsoft Word:Users:mtmanner:Documents:Family JY & Friends:Craig:Craigs Goals:Socializing:Being with people.doc"

try

set command to "open Users/mtmanner/Documents/Family JY & Friends:Craig/Craigs Goals/Socializing/Being with people.doc"

do shell scriptcommand

end try


Thanks for your help.

MacBook Air (11-inch Late 2010), Mac OS X (10.7.2)

Posted on Jul 31, 2013 4:57 AM

Reply
Question marked as Best reply

Posted on Jul 31, 2013 8:38 AM

No need to get so complicated.


tell application "Finder"

open file "Being with people.doc" of folder "Socializing" of folder "Craigs Goals" of folder "Craig" of folder "Family JY & Friends" of folder "Documents" of folder "mtmanner" of folder "Users" of startup disk

end tell


Incidentally the second section of your script has a colon instead of a slash before the folder 'Craig'.

4 replies
Question marked as Best reply

Jul 31, 2013 8:38 AM in response to mtmanner

No need to get so complicated.


tell application "Finder"

open file "Being with people.doc" of folder "Socializing" of folder "Craigs Goals" of folder "Craig" of folder "Family JY & Friends" of folder "Documents" of folder "mtmanner" of folder "Users" of startup disk

end tell


Incidentally the second section of your script has a colon instead of a slash before the folder 'Craig'.

Jul 31, 2013 8:57 AM in response to mtmanner

There is a useful book called 'AppleScript for Dummies'. Don't be put of by the irritating title: it's actually quite sensibly written and informative (just ignore the occasional facetiousness designed not to frighten nervous readers off). When I was looking for a manual the other books available were much more expensive; I've found this one covers most requirements.


We had three weeks of heatwave: not it's gone unsettled again with rain (which we needed) and temperatures up and down loke the proverbial yo-yo - typical British summer, in other words.

Using applescript to get iCal to open a file

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.