Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thriftinkid

macrumors regular
Original poster
Mar 24, 2008
119
0
Hey Guys, Here's my dilema. Basically I have an applescript that takes all my quicktime movies from a designated folder and uploads them to my ftp site. I have to send out an e-mail message with a link to each quicktime I uploaded. So bascially I need to write a script that just copies and pastes the same url with the end tag changed with each quicktime name in that folder, but I don't know how to go about starting it. I new to writing any kind of code, so any advice would be of great help. Thanks guys.

Example:

http://www.myftpsite.com/quicktimes/quicktime1.mov
http://www.myftpsite.com/quicktimes/quicktime2.mov
http://www.myftpsite.com/quicktimes/quicktime3.mov
http://www.myftpsite.com/quicktimes/quicktime4.mov
 

thriftinkid

macrumors regular
Original poster
Mar 24, 2008
119
0
Hey Guys, Here's my dilema. Basically I have an applescript that takes all my quicktime movies from a designated folder and uploads them to my ftp site. I have to send out an e-mail message with a link to each quicktime I uploaded. So bascially I need to write a script that just copies and pastes the same url with the end tag changed with each quicktime name in that folder, but I don't know how to go about starting it. I new to writing any kind of code, so any advice would be of great help. Thanks guys.

Example:

http://www.myftpsite.com/quicktimes/quicktime1.mov
http://www.myftpsite.com/quicktimes/quicktime2.mov
http://www.myftpsite.com/quicktimes/quicktime3.mov
http://www.myftpsite.com/quicktimes/quicktime4.mov

I'm looking for it to be an applescript, but it doesn't have to be.
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
Let's say, in the other applescript, that the current movie file is stored in a variable called currMovie. In that AppleScript, have it call your second AppleScript, and reference currMovie. For example, something like this:

Code:
<init code goes here>
tell application "Mail"
compose new email
set to of the current email to "address@example.com"
set body of the current email to currMovie + "your extra text goes here"
end tell
<cleanup code goes here>

It helps a LOT to look at the application's dictionary when trying to AppleScript it. I don't know the exact commands for doing what you're trying to do, but that example code should give you a start.

To look at the dictionary for an application, open Script Editor, then, from the File menu, choose Open Dictionary..., navigate to the application you want, and click OK.

shaggy.mac said:
send me a PM
PM, in this case, means private message.
 

thriftinkid

macrumors regular
Original poster
Mar 24, 2008
119
0
Let's say, in the other applescript, that the current movie file is stored in a variable called currMovie. In that AppleScript, have it call your second AppleScript, and reference currMovie. For example, something like this:

Code:
<init code goes here>
tell application "Mail"
compose new email
set to of the current email to "address@example.com"
set body of the current email to currMovie + "your extra text goes here"
end tell
<cleanup code goes here>

It helps a LOT to look at the application's dictionary when trying to AppleScript it. I don't know the exact commands for doing what you're trying to do, but that example code should give you a start.

To look at the dictionary for an application, open Script Editor, then, from the File menu, choose Open Dictionary..., navigate to the application you want, and click OK.


PM, in this case, means private message.

The list doesn't necessarily have to go directly into the e-mail message. It can be written to be made in text editor or something, and then I can have it copied and pasted into an e-mail message later. I am familiar with the dictionaries, but I don't know which one I should be looking at. The FTP program, safari, text editor?
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
The list doesn't necessarily have to go directly into the e-mail message. It can be written to be made in text editor or something, and then I can have it copied and pasted into an e-mail message later. I am familiar with the dictionaries, but I don't know which one I should be looking at. The FTP program, safari, text editor?
The dictionary for whichever application you are using to send the email. I assumed in that sample code that you were using Mail - the one that comes with Mac OS X.

If you're going to be copy/pasting text into a text editor first, then you'll need the text editor's dictionary as well. Basically, you'll need to look at the dictionary for any application your script uses. If it uses more than one, you'll use more than one dictionary.
 

thriftinkid

macrumors regular
Original poster
Mar 24, 2008
119
0
The dictionary for whichever application you are using to send the email. I assumed in that sample code that you were using Mail - the one that comes with Mac OS X.

If you're going to be copy/pasting text into a text editor first, then you'll need the text editor's dictionary as well. Basically, you'll need to look at the dictionary for any application your script uses. If it uses more than one, you'll use more than one dictionary.

The other problem I'm having is that this is a list. The script above just gives the ability to change the end tag if I type it in manually right?
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
The other problem I'm having is that this is a list. The script above just gives the ability to change the end tag if I type it in manually right?
True. However... the other script should, if it's designed right, be using the names as part of a loop. All you have to do is make a second list, if you want more than one end tag, and append the appropriate list entry each time through the loop.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.