FrostyCat
Redemption Seeker
Do you miss legacy GM's ability to try out small snippets without committing to a full project? With a little shell scripting and the Mac OS X automator, this is relatively easy to bring back.
Step 1: The Shell Script
Create a directory named GMScratch in your home directory and create a file named gmscratch.command in it. Then paste the following code into gmscratch.command:
Step 2: The Template
Create an empty project named scratchpad and save its whole project directory in ~/GMScratch. You may include libraries and other resources that you use often, so that you don't have to re-import them later.
Step 3: The Automator Shortcut
This enables the command file to execute without a visible window.
This is what your ~/GMScratch directory should look like once you're done:
Then simply pin the automator app on your dock. Click and experiment away!
Step 1: The Shell Script
Create a directory named GMScratch in your home directory and create a file named gmscratch.command in it. Then paste the following code into gmscratch.command:
Code:
#!/bin/bash
# Configure the temporary project directory
scratchdir=`mktemp -d`
# Copy the scratchpad project and open it
cp -Rf "`dirname $0`/scratchpad" "$scratchdir"
open -W "$scratchdir/scratchpad/scratchpad.yyp"
# When GMS 2 closes, remove the copied scratchpad project directory
rm -Rf "$scratchdir"
Create an empty project named scratchpad and save its whole project directory in ~/GMScratch. You may include libraries and other resources that you use often, so that you don't have to re-import them later.
Step 3: The Automator Shortcut
This enables the command file to execute without a visible window.
- Open Automator.
- Under "Choose a type for your document", choose "Application".
- Find and drag in the action "Run Shell Script". Enter the following code:
Code:
/bin/bash ~/GMScratch/gmscratch.command
- Save the result in ~/GMScratch as GMS 2 Scratchpad.
This is what your ~/GMScratch directory should look like once you're done:
Then simply pin the automator app on your dock. Click and experiment away!