Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 10, 2013, 10:40 AM   #1
redwgaontoy
macrumors newbie
 
Join Date: Jun 2013
Applescript how to save to PC on network

Currently I have an Applescript that saves a mail attachment to my Desktop. I would like to change it to save to a a PC on my network. Not really sure how to change it.

The PC shows up in Finder under shared and the server shows as

smb://shipping/SharedDocs/

Code:
on perform_mail_action(theData)
	
	set theOutputFolder to "Macintosh HD:Desktop"
So I would like to change theOutputFolder to the shipping/SharedDocs/

I am not really sure how to do this and any assistance would be much appreciated.

Scott
redwgaontoy is offline   0 Reply With Quote
Old Jun 10, 2013, 12:55 PM   #2
see.solve.
macrumors newbie
 
Join Date: Oct 2012
The easy way is to find the name of that folder is to select the PC folder in the Finder, then run the following script:
Code:
tell app "Finder"
	(selection as alias)
end
The result will be the folder location. Copy and paste that into your script.
see.solve. is offline   0 Reply With Quote
Old Jun 10, 2013, 03:35 PM   #3
redwgaontoy
Thread Starter
macrumors newbie
 
Join Date: Jun 2013
Script returned "SharedDocs:"

The script returned "SharedDocs:" but that doesn't work
redwgaontoy is offline   0 Reply With Quote
Old Jun 10, 2013, 04:55 PM   #4
kryten2
macrumors 6502a
 
Join Date: Mar 2012
Location: Belgium
Try :

Code:
set theOutputFolder to "Macintosh HD:Volumes:SharedDocs:"
__________________
Space Corps Directive 34124
kryten2 is offline   0 Reply With Quote
Old Jun 10, 2013, 11:56 PM   #5
see.solve.
macrumors newbie
 
Join Date: Oct 2012
That's curious. It works for me. I wonder what the difference is.
see.solve. is offline   0 Reply With Quote
Old Jun 11, 2013, 04:36 AM   #6
redwgaontoy
Thread Starter
macrumors newbie
 
Join Date: Jun 2013
Using "Macintosh HD:Volumes:SharedDocs:" worked

Worked using the

Code:
set theOutputFolder to "Macintosh HD:Volumes:SharedDocs:"
Thank you!
redwgaontoy is offline   0 Reply With Quote
Old Jun 11, 2013, 05:32 AM   #7
redwgaontoy
Thread Starter
macrumors newbie
 
Join Date: Jun 2013
Now how do I replace the existing file

I need this script to replace the existing saved attachment

My original code to save is
Code:
save theAttachment in theSavePath
I tried

Code:
save theAttachment in theSavePath with replacing
This did not work, but just need to overwrite existing file
redwgaontoy is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:17 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC