Create archive using only applescript....no terminal specifically

My employer has some amazing security on both the Macs and PCs. Unfortunately it seems to just get in the way for me and my scripts. I know that I can zip a file through ‘do shell script’, but I cannot access the terminal. We also do not have StuffIt for anything but opening zip files. I’m in the process of speaking with the IT team about getting one of these functionalities, or at least installing something like ZipIt, for now though, is there any way to zip a file using only applescript?

Model: Dual 2GHz G5, 2 GB
AppleScript: 2.1.1
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

no shell? /shudder

For the record though restricting access to the terminal application does not stop

do shell script "blah"

from working as that does not acctually use the terminal app itself. I know this because I lock my users out of the terminal as well, but my scripts which utilize do shell script work without any problems.

Hi Brad,

without StuffIt or the terminal it’s only possible with GUI scripting.
I assigned the keyboard shortcut ctrl-cmd-A to “Create Archive” in the Finder’s file menu,
(you can do this in System Preferences > Keyboard & Mouse > Keyboard Shortcuts)

This script creates an archive from the selected files/folders using that shortcut

tell application "Finder"
	activate
	set sel to selection
end tell

tell application "System Events"
	tell process "Finder" to keystroke "a" using {command down, control down}
end tell

Um…Jeez…I feel dumb. :smiley:

Thanks. Odd though…the volume on my desktop is called “NewsPaper” and other applescripts access it using that name of course, however, when I ‘do shell script,’ I have to call it “NewsPaper-1” – any clue why that is?

That’s a great idea. I think the IT guys aren’t too happy about me doing that, but I’m not entirely sure, so maybe I’ll just do that.

Interesting… it would almost appear from what you described that their a ghost mount in your volumes.

if you do this

set x to do shell script "cd /Volumes; ls -la"

What is the output?

Well, IT is on to me and we have a meeting to discuss this matter tomorrow at 3:30.

It’s not a big deal, but they do want to talk - so I’m not accessing the terminal anymore from AS until they say it’s ok. :confused:

Ok, I did it anyway and sure enough, there is an admin only volume there that I’m accessing, I’m done now…talk to you soon if I still have a job!:o

Did they make you sign an AUP? Just in case.