Hi griffin239, Here is a small script that might just do what you want: tell application SubEthaEdit set outputName to murgalua Output as text try set x toMessage 1 of 2 , Apr 6, 2010View SourceHi griffin239,Here is a small script that might just do what you want:
tell application "SubEthaEdit"
set outputName to "murgalua Output" as text
set x to first document whose name is outputName
if (name of x is equal to outputName) then
set contents of the front document to contents of the front document & "foo"
set myf to make new document
set myf to the front document
set name of myf to outputName
set contents of the front document to "foo"
end tellHope this helps!
--- In SubEthaEdit@yahoogroups.com, "griffin239" <bill@...> wrote:
> Here is the meat of the script I'm using.
> --It runs my front document in murgaLua, all well and good.
> tell application "Terminal"
> set shellscriptString to "/usr/bin/murgalua " & SQ & documentPath & SQ as text
> --set the contents of the front window to shellscriptString
> do script shellscriptString
> set the clipboard to contents of the front window as text
> set ds to contents of the front window as string
> end tell
> -- Here is where I'm going woefully wrong
> tell application "SubEthaEdit"
> set myf to make new document
> set myf to the front document
> set contents of the front document to ds
> end tell
> -- from that chunk i'm getting many many 'untitled' documents.
> My question is how do I set it up so the same document is always opened and appended to?
> While I'm on that subject how would I set that document to be someplace any old SubethaEdit user on any machine can access if using the script.
> Using "/Users/myaccount/somefolder/murgalog.txt" doesn't seem like the right solution.
> Thanks in advance,
> Mr Bill