Unstuffing sit file

Hi All

I have developed a program for unstuffing sit file. See the code below:


tell application "StuffIt Expander"
	set The_file to choose file with prompt "Choose"
	expand The_file
end tell

Now my problem is that I want to develop droplet of it.

And fact speaking I give 0 to myself out of 10 to make a droplet. Please if somebody can help me.

Please give whole procedure and code + process.

Regards,
Rajeev

Macrajeev:
Try this…


on open thefile
	tell application "StuffIt Expander"
		expand thefile
		quit -- This is added to quit Stuffit, otherwise it will stay open.
	end tell
end open

Save this as an application and drag and drop files on it. Just curious… Why not just double click the file to expand it ?!?

Cheers,
Jim Neumann
BLUEFROG

Glad to help, here’s something basic:

on open theFiles
	tell application "StuffIt Expander"
			expand theFile
	end tell
end open

The only things that I added were the Open handler, which is what you need to have in a droplet.

You need to save the above code as an application for it to work as a droplet.

If you haven’t already, make sure you take a gander at the AppleScript Language Guide. It’s a bit dated, but it has most of what you need to get started – plus it’s free. :slight_smile:

You can read it here: http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScriptLangGuide/index.html

If you have any questions feel free to ask.

Good luck,
Tom

Thanks to both of you.
One friend given me this code


on open (theFile)
	tell application "StuffIt Expander" to activate
	tell application "StuffIt Expander" to open theFile
	tell application "StuffIt Expander" to quit
end open
my PostError("Don't click on me!
I'm an AppleScript Droplet.
Only drag and drop files on me.")
my PostError
to PostError(theMessage)
	beep
	display dialog theMessage ¬
		buttons {"Sorry!"} default button "Sorry!" with icon 1 giving up after 12
end PostError

Now I need a program for Stuffing folders and files. Does any one have.

Regards
Rajeev

Hi both oof you, See below I have developed a program to stuff a folder.


on open The_file
	tell application "DropStuff"
			open The_file
	end tell
end open



Is it correct or need some modification.

regards
Rajeev

Macrajeev,

To see an application’s AppleScript dictionary, either drag the application’s icon to Script Editor’s icon or while in Script Editor go to File → Open Dictionary…

Once you do that you will see the commands that you are looking for: stuff, zip, tar.

Here’s a modified script that will work:

on open thefiles
	tell application "DropStuff"
		stuff thefiles
		quit
	end tell
end open

Hope that helps,
Tom

Hi tmckenna

I have try it but it was not working, so that’s why I use it, My program is running very fine. There is no such problem at all.

Now I have another problem and that is version control.

My system has Drop Stff 5.0, 6.0 and 7.3.1 also, but I want to use only Drop Stuff 7.3.1. Any idea that how could I controll it.

Regrads,
Rajeev

How about downloading the latest version and deleting the old versions?

–Tom