Screenflick 2 Support

Screenflick 2 Support

Still have a question? Ask us.

Screenflick 2 This page applies to Screenflick 2 only.

Automating Screenflick 2 Recordings

Starting recordings with AppleScript.

Requires Screenflick 2.0 or later.

Applies through Screenflick 2.9.

You can set up automated Screenflick 2 recordings using AppleScript. Combine them with Automator workflows and Calendar alarms, and you can do quite a bit.

Can I use AppleScript to automate Screenflick recordings?

Yes, in Screenflick 2. (In Screenflick 3, use Automator instead.) Combine a script with Automator workflows and Calendar alarms. Keep reading.

Example Script #

This example starts a timed Screenflick recording of a specific area of the screen. Because it's wrapped in an on run block, it's suitable for dropping into an Automator workflow.

on run {input, parameters}

	-- Bring Screenflick to the front
	tell application "Screenflick" to activate

	-- Start a recording
	tell application "System Events"
		tell process "Screenflick"

			-- Open the Recording view
			click menu item "Recording" of menu "Window" of menu bar 1

			-- Set the recording timer
			tell window "Screenflick"

				-- Turn the timer off
				tell checkbox "Set Timer"
					if (its value as boolean) then click it
				end tell

				-- Turn the timer on
				click checkbox "Set Timer"
				tell sheet 1
					set value of text field 1 to "0" -- hours
					set value of text field 2 to "0" -- minutes
					set value of text field 3 to "10" -- seconds
					keystroke return
				end tell
			end tell

			-- Start Recording (Open the Screen Selection view)
			click menu item "Start Recording" of menu "Record" of menu bar 1
			delay 1

			-- Set the screen area to record
			tell window "Selection Window"
				perform action "AXRaise" -- makes the window frontmost

				tell pop up button "Selection Type"
					click -- Show the menu
					click menu item "Fixed Size" of menu 1
				end tell

				-- Set the left / bottom of the selected area in global screen points
				-- Must set the values to strings, not integers
				set value of text field "Left" to "100"
				set value of text field "Bottom" to "100"

				-- Triggers Screenflick to use those values
				-- (only confirming one of the fields is fine)
				perform action "AXConfirm" of text field "Left"

				-- Set width and height of the recording area
				set value of text field "Width" to "800"
				set value of text field "Height" to "600"
				perform action "AXConfirm" of text field "Width"
			end tell

			-- Now start recording
			click button "Record" of window "Selection Window"
		end tell
	end tell

	return input
end run

What the Script Does #

  • Brings Screenflick to the front and opens its Recording view.
  • Sets the recording timer to ten seconds.
  • Starts the recording, which opens the screen selection window.
  • Chooses a fixed-size selection, at a given position and size in global screen points.
  • Clicks Record.