The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniOutliner > OmniOutliner 3 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Applescript save? Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
I cannot seem to figure out how to save an OO file using data I have from the file. Here's what I'd like to do:

grab the contents of a row and make that be the filename
save the file with that name in a certain folder (which is hard-coded).

Hopefully I'm just doing something stupid, but I'd sure appreciate some help here!

My simple code that "should" work:

set thepath to "/Users/wblj/myfolder/" as text
-- go take a look at the front doucment:
set thedoc to document 1
-- go get the user-specified filename from the column title:
set thetitle to title of column 2 of thedoc
-- Set the document to know where to save itself:
set properties of thedoc to {name:(thetitle), path:(thepath)}
-- Save away
save thedoc

What happens is the the file saves itself as a folder / xml file at the root of the drive. Not what I had in mind.

I've tried variations:

set thepath to "/Users/wblj/myfolder/" as text
-- go take a look at the front doucment:
set thedoc to document 1
-- go get the user-specified filename from the column title:
set thetitle to title of column 2 of thedoc

-- Save away
set thenewpath to thepath & thetitle
save thedoc in (thenewpath as string)

This does exactly what I have in mind, except that the file doesn't know where it saved itself, so you cannot do additional saves form the app :-(

Any help would be most appreciated!
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How I save a perspective with AppleScript? kroger OmniFocus Extras 2 2012-03-23 10:56 PM
Applescript to Save Clipboard to Clippings? jamespro OmniOutliner 3 for Mac 0 2011-03-23 11:11 AM
AppleScript save as PDF - how can I get the whole page? jerremy OmniGraffle General 7 2009-03-14 03:17 PM
Applescript hook for save as web archive jsg OmniWeb Feature Requests 0 2006-11-15 11:06 AM
Applescript to save and export as pdf brab OmniGraffle General 0 2006-08-10 12:20 AM


All times are GMT -8. The time now is 05:52 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.