hello, hello:
Let me describe the use case for my applescript and then I'll share my applescript problem.
I typically have multiple Mori documents open at the same time. I use multiple virtual desktops and will frequently be in some other application in a different virtual desktop when I realize I want to write down a quick note in a particular mori document. I started out w/ note-chan. However, note-chan just creates a new entry at the top level of the frontmost document. I'm looking for something more targetted that I can invoke via quicksliver.
so, I started putting together an applescript to lauch an entry called "Scratch" from a particular mori document (that is always open, but not necessarily frontmost).
my applescript currently looks like this:
tell application "Mori"
set current entry to entry named "Scratch" of document named "DocumentA.mori"
end tell
tell application "System Events"
tell process "Mori"
set frontmost to true
tell menu bar 1
tell menu "File"
click menu item "New Note Window"
end tell
end tell
end tell
end tell
if DocumentA.mori was already the frontmost document, then this script works. However, if DocumentB.mori was actually tthe frontmost Mori window, then the script doesn't really do anything.
any applescripters have a tip on how I might more consistently target a particular open Mori document with this sort of applescript?
thanks.
I've changed things so that
I've changed things so that in the next release I think your script will work (setting the current entry at the application level will make the entries document become frontmost in the next version), but I'm not sure how you can easily work around the problem in the meantime.