Skip to content

Instantly share code, notes, and snippets.

@mhulse
Last active June 24, 2016 05:48
Show Gist options
  • Save mhulse/cdd0db5882400c4bce2c91ccd2150dc7 to your computer and use it in GitHub Desktop.
Save mhulse/cdd0db5882400c4bce2c91ccd2150dc7 to your computer and use it in GitHub Desktop.
Opening JSX file using PHP’s exec() and Adobe Illustrator’s bundle identifier …
#target illustrator
alert('OMG');
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
# http://brettterpstra.com/2014/08/06/shell-tricks-the-os-x-open-command/
echo exec('open -b com.adobe.illustrator test.jsx');
#!/bin/bash
# bash <(curl -sL https://gist.github.com/mhulse/cdd0db5882400c4bce2c91ccd2150dc7/raw/test.sh)
open -b com.adobe.illustrator https://gist.github.com/mhulse/cdd0db5882400c4bce2c91ccd2150dc7/raw/test.jsx
@mhulse
Copy link
Author

mhulse commented Jun 21, 2016

Get an app’s bundle identifier using:

$ mdls /Applications/Adobe\ Illustrator\ CC\ 2015/Adobe\ Illustrator.app | grep kMDItemCF
kMDItemCFBundleIdentifier      = "com.adobe.illustrator"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment