I worked with Processing and Arduino for years and appreciated the cmd-r shortcut for running the project. This is what i was missing for years while editing X3D files in TextWrangler and running in InstantPlayer. Finally it only took me 10 minutes googling and scripting. The result is brilliant: cmd-r and my X3D file opens in InstantPlayer. I hit Esc and it returns to TextWrangler.
This is how it works:
1. Download and copy the script “Open in Instant Player.scpt” (remove .txt) into TextWrangler’s Scripts folder (~yourhome/Library/Application Support/TextWrangler/Scripts) -> It now appears in the Script Menu.
2. Open in TextWrangler “Window/Palettes/Scripts”
3. Select the “Open in InstantPlayer” script
4. Click “Set Key…” and define a shortcut (mine is cmd-r)
PS: Enable “Allow tab key to intend text blocks” in “Preferences/Editing: Keyboard”, too!