This is a glueing together of Jeffrey Alexanders 2writeroom script, and the synch to external editor script I posted earlier. Basically it synchs (both ways!) a single writeroom to the text of the current note. The idea is that the writeroom sits behind Mori with the note text. When you want to go there you activate (by quicksilver or clicking) when you want to come back to Mori you quicksilver back. However DO NOT RUN THIS FROM WITHIN THE MORI SCRIPTS MENU. That seems to make everything hang. You can run it from everywhere else though. At some point I'll look into what goes on there.
tell application "Mori"
-- grab the content of the active note (even if blank) and throw it to WriteRoom
tell application "Mori" to set my_text to note of (current entry as reference)
set e to current entry
tell application "WriteRoom" to activate
-- here we work around a bug in WR 1.0beta, which needs its documents created through the menu routine in order to autosave, otherwise we will get bitten by a recurring prompt to save the new buffer
tell application "System Events"
tell process "WriteRoom" to click menu item "New WriteRoom" of menu 1 of menu bar item "File" of menu bar 1
end tell
--the fun part
repeat
tell application "WriteRoom"
tell application "Mori"
set my_text to note of (current entry as reference)
set e to current entry
end tell
set my_WRdocument to the document of window 1
set the zoomed of window 1 to true
set the text of my_WRdocument to my_text
end tell
tell application "Mori"
repeat while e is current entry
set last_note to note of e
tell application "WriteRoom"
set my_WRdocument to the document of window 1
set my_text to the text of the document of window 1
end tell
delay 1
set current_note to note of e
if current_note is last_note then
set note of e to my_text
else
tell application "WriteRoom"
set text of the document of window 1 to current_note
end tell
end if
end repeat
end tell
end repeat
end tell
I can't duplicate your problems
That's fairly workable if you want you changes applied back to Mori as you type; although there are some tweaks still necessary in your code for processing overhead, that's an interesting take on it. I wonder though why would you return to Mori and change the active note while you had it open for editing? but in any case I couldn't duplicate your crash when you changed active notes. The WR window is not temporary, it is a completely independent window with the text from Mori copied into it. If you (or anyone else)is having that crash with any frequency, let me know. And it runs fine when launch from the menu bar (how would it not?) -- in the original version, anyway. I wonder what your error messages were.
It's a little different from using WR as the fullscreen option of Mori (in the way other editors use fullscreen), you're essentially using both editors simultaneously. This version also limits the options which I was planning on exploring of allowing the user to choose whether to replace the content of the original note (updating) create a new note (versioning) or create a new note while calling Apple's FileMerge to do a diff-style comparison of the new and old, or even other post processing -- for example, saving the original, running a copy through textile, writing the resulting XHTML markup to an external file or application or even uploading it/writing it to a server directory automatically....
Even more fun. But I'm glad my code could help you with what you were needing to do.