Use AppleScript to automate tasks

core-tunnel
core-shell

(Yang.Y) #1

The Premium version of Core Shell and Core Tunnel have AppleScript support, you can automate tasks and improve productivity with only a teaspoonful of programming knowledge.

The AppleScript dictionary contains the available AppleScript commands for Core Shell and Core Tunnel. To view the dictionary:

  1. Open the AppleScript Editor in Applications > Utilities.
  2. Choose File > Open Dictionary.
  3. Select Core Shell or Core Tunnel. Click Choose.

Examples

Core Shell

Under construction…

Core Tunnel

to waitUnitlConnected(tunnelName)
	tell application "Core Tunnel"
		connect tunnelName
		get state of first tunnel where name = tunnelName
		repeat until result = "Connected"
			delay 1
			get state of first tunnel where name = tunnelName
		end repeat
	end tell
end waitUnitlConnected

tell application "Core Tunnel"
	my waitUnitlConnected("A Mysterious Tunnel")

	-- do some tasks ...
	-- disconnect "A Mysterious Tunnel"
	
	-- connect with tag "tag_name"
	-- disconnect with tag "tag_name"
	
	-- connect all
	-- disconnect all
end tell

Apple Script Info