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

BenJuan26

macrumors newbie
Original poster
Sep 17, 2011
7
0
Canada
I have been diving into some deeper GeekTool usage, and have found some great AppleScripts that tell GeekTool to do a variety of things. I was wondering if anyone knows of a list of all the AppleScript commands GeekTool will recognize. I have searched for quite some time and have not found such a list.
 

tag

macrumors 6502a
Apr 29, 2005
918
9
The reason you haven't found such a list is because one probably doesn't exist.

I mean basically any ApplesScript can be run by GeekTool, as GeekTool just executes an AppleScript via command line program 'osascript'. So GeekTool has the capability of running any AppleScript. You could even run an AppleScript through GeekTool that creates a popup window every time it refreshes (via display dialog / display alert, etc...) if you really wanted as far as I know.

GeekTool is essentially a middleman for displaying output from scripts/code at preset intervals of your choosing. If an AppleScript or other code can be executed via commandline, it can be run through GeekTool.
 

BenJuan26

macrumors newbie
Original poster
Sep 17, 2011
7
0
Canada
I'm aware that GeekTool can run any AppleScript, but AppleScript can also execute commands to GeekTool using 'tell application "GeekTool Helper" ...'. For example I've managed to do this:
Code:
tell application "GeekTool Helper"
	-- disable any visible groups
	set numOfGroups to number of groups
	set i to 1
	repeat numOfGroups times
		set visible of group i to false
		set i to i + 1
	end repeat
	
	-- enable the group that was selected
	set visible of group choiceAsString to true
	
end tell
It's worked fine so far, but I had to guess which commands GeekTool would accept. I'm interested in what other things I can ask GeekTool to do from AppleScript.
 

tag

macrumors 6502a
Apr 29, 2005
918
9
Ah sorry I misunderstood what you were asking.

You can use the "AppleScript Editor" app to view command dictionaries for apps. Simply open AppleScript Editor, click "File", click "Open Dictionary...", then choose "GeekTool Helper" from the list, and you should be shown documented classes and commands for that app. Though I will say this is not always complete, but it's the only thing I've personally come across other than developer documentation, which after a quick search, I didn't come across any online for GeekTool.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.