MACSCRPT Archives

June 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Stockly, Ed" <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 9 Jun 2006 10:30:08 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (53 lines)
Thanks everyone for your input...

A big part of the problem for me is that with limited knowledge of shell scripting, I use the terminal for trial and error until I get it right, which is fine for creating the script. But I don't want the terminal to activate during execution. 

I'm wishing that any shell script I run inside terminal would run with the same results from do shell script, but it doesn't.

>>Leraillez>> do script ftpShellScript

>>>do shell script ftpShellScript

    >>>No?

 "do script" is the command that works in terminal, "do shell script" is what I want to work from within an applescript.


>>>John>>>I had prefaced the script with some kind of prep line.  For example in Perl it was 

>>>>>#$/usr/bin/perl -m
 >>>maybe you need something similar, like "#bash" or whatever.
 

Thanks, I think that's definitely on the right track, but I have no idea what any of that means, but it looks like something that could work.

>>>>What's the error you're getting 

I've been doing a lot of trial and error. In some cases it says that's not a valid command, in other cases there's no error message that I can see, but the file isn't transferred anywhere. 

>>deivy>>It works!
>>>At least it works here.
>>>I believe it works there as well... you get an error message, but you should get the same error message in Terminal. Terminal simply by-passes it.

For me works would mean successfully uploading the file to the specified directory and in my case, it doesn't work.

>>>The problem is, you would be downloading files to the root directory...

This script uploads, not downloads, and the directories etc. are not the problem because it works in terminal 100% of the time with 100% reliability. 

in short, with everything else the same, 

this script fails

	do script ftpShellScript

and this script works

	tell application "Terminal"
                 do script ftpShellScript
                 delay 3
                 set shellScriptLog to contents of window 1
	end tell

ES

ATOM RSS1 RSS2