Home  About Moonrise.org Logo New  Site Map
Astronomy  Computers Games  Print  Media Opinion  Other

Page Location: Home --> Computers --> OneClick

OneClick

Content Created: July, 1999 / Updated: November 10, 2005

OneClick is a really amazing macro utility for the Macintosh. You owe it to yourself to visit WestCode's site to look into it. (Well, if you have a Macintosh, that is, because there's no Windows version...) I use it every day for many different tasks!

For more information about how OneClick works, take a look at the OneClick Fan Site.


The following palettes are free to download and use, but I retain the copyright. So no posting them elsewhere without my permission! (Of course, you need to own a copy of OneClick to use them.) Feel free to modify them to help you out. Let me know if you add any nifty features, I may be interested too!

File Mangler v1.0
Version 1.0 is quite simple and straightforward; it lets you look at and change file creator and kind information. It'll then happily collapse to the left side of your screen until you need it next. (I plan to expand on that in future versions to include things like creation date and visibility.)
Stupid Mangler Trick #1: Want to edit a Read-Only SimpleText file? Drag it into the Mangler and select "SimpleText Text" from the menu. Change it back to "SimpleText Read-Only" to change it back.
Download File Mangler v1.0


Back 'em Up v1.0
This allows you to quickly and easily back up items of importance, like, hmm, your OneClick Palettes? You know you need to back them up...
Download Back 'em Up v1.0

Get/Change Finder Labels
This is a short script I recently put together that will get and set Finder labels, from whatever program you're in. Just put the following script in a button. Drag any file onto it. You can then use the drop-down menu to see and change the Finder label of that file.
On DragAndDrop
	Variable theFile, theLabel
	theFile = ListItems GetDragAndDrop, 1
	Button.Data = theFile
End DragAndDrop


On MouseDown
	Variable saveFile, saveLabel, temp
	Variable Global theGlobalFile, theGlobalLabel
	
	saveFile = theGlobalFile 	// save old value of theGlobalFile, in case it's being used elsewhere
	saveLabel = theGlobalLabel
	
	theGlobalFile = Button.Data
	AppleScript 
		set theFile to (get OneClick variable "theGlobalFile")
		tell application "Finder"
			return (label index of (file theFile))
		end tell
	End AppleScript
	theGlobalLabel = ASResult
	

	theGlobalLabel = PopupMenu "~File: " & theGlobalFile & "<RETURN>-<RETURN>0<RETURN>1<RETURN>2<RETURN>3<RETURN>4<RETURN>5<RETURN>6<RETURN>7", theGlobalLabel
	If theGlobalLabel <> ""
		AppleScript 
			set theFile to (get OneClick variable "theGlobalFile")
			set theLabel to (get OneClick variable "theGlobalLabel")
			tell application "Finder"
				set the (label index of (file theFile)) to theLabel
			end tell
		End AppleScript
	End If 
	
	theGlobalFile = saveFile 	// restore theGlobalFile
	theGlobalLabel = saveLabel
End MouseDown

	

GraphicConverter Full-Size/Thumbnail creator
I recently needed to convert a bunch of scanned pictures, making a somewhat standard full-size one, and a thumbnail. I whipped up this script to help automate this process. Unfortunately, I couldn't get the pop-up menu selection to JPG to work, so it asks you to do it and watches. This is an example of a utility script that needs some customization, one of those great things that you can use OC for. Unfortunately, no OC in OSX yet, so I'm hesitant to switch to the new operating system.
This will default to 600 pixels wide, but you can change it by holding down the Option key when clicking the button. (It remembers this once you set it, as well as the file name.) It will ask for a file name to save the file as. It will put the value of the variable "prefix" before this name, and ".jpg" after. The thumbnails are saved with a width of 1/4 the full size, and have a "-s" added before the ".jpg". Of course, all of these are customizable.
Variable theName
Variable theWidth
Variable pos
Variable prefix

prefix = "IMG-"

theName = Button.Data
pos = Find "/", theName
If pos = 0
	theName = ""
	theWidth = "600"
Else 
	theWidth = SubString theName, pos + 1, - 1
	theName = SubString theName, 1, pos - 1
End If 

If OptionKey
	theWidth = AskText "Please enter the new width.", theWidth, "-1"
End If 


theName = AskText "Please enter the name of the file ('" & prefix & "' will be put before and '.jpg' after.)", theName, "-1"
If theName = "-1"
	Exit 
End If 
Button.Data = theName & "/" & theWidth

SelectMenu "Picture", "Size", "Scaleä"
Type theWidth
Pause 30
SelectButton "OK"
Pause 5
SelectMenu "File", "Save asä"
// SelectPopUp Global 580, 179, "JPEG/JFIF"
Speak "please change to J PEG"
Repeat 20
	Pause 10
	Type Command "c"
	If Find ".jpg", Clipboard
		Speak "thank you"
		Exit Repeat 
	End If 
End Repeat 
Type prefix & theName & ".jpg"
SelectButton "Save"
Pause 10


SelectMenu "Picture", "Size", "Scaleä"
Type (theWidth / 4)
Pause 30
SelectButton "OK"
Pause 5
SelectMenu "File", "Save asä"
Type prefix & theName & "-s.jpg"
SelectButton "Save"

SelectMenu "File", "Close"
Speak "all done"