|
CubicNavigator can be controlled through AppleScript, which allows many possibilities: having a slideshow start when the computer starts, controlling the VR view from another app for training purposes, opening VR scenes in response to help requests, and so on.
AppleScript is powerful and generally easy to use, but sometimes its syntax can encourage silly errors, even for experienced scripters. Often, the best way of piecing together a useful script is to cut and paste lines from an existing working script. Below are listed a number of scripted examples which CubicNavigator understands. Most of these blocks can simply be cut and pasted into Script Editor, then further adapted as required. For a list of commands and properties in AppleScript parlance, open CubicNavigator's AppleScript dictionary by going to Script Editor's File > Open Dictionary menu command and select "CubicNavigator" from the alphabetical list which appears.
Scripting CubicNavigator is straightforward, there are just one or two notes to watch out for: Commands can be sent to, and properties set for, both windows and the application itself. In version 1.0 of CubicNavigator only one window is allowed (so as to reduce the impact on OpenGL VRAM use), so these have the same meaning. For example, "set URL to..." is the same as "set URL of window 1 to..." It is thus easier to script the application directly rather than referring to a window.
(* setting a web address to view *)
(* setting a local file to view *)
(* emptying the VR view *)
(* testing the current pan/tilt/zoom of the view *)
(* setting the "pan" or "tilt" or "zoom" of the view *)
(* setting pan/tilt/zoom all at once *)
(* starting and stopping a slideshow *)
(* going into fullscreen mode *)
(* loading and playing a recording of a panning sequence *)
(* getting the duration of a recording (seconds) *)
(* loading the current page into Safari *)
(* opening an existing bookmark *)
(* hiding/showing the cursor *)
(* hiding/showing keywords *)
(* panning by small amounts *)
(* panning continously *)
|