Platform Codes

If you would like to see more example codes, or if you are looking to make an application that is not listed below, Just post a comment below!

Here are some things you can do as of right now.

1. Set background color of app
2. Launch ANY url even tel:// and such schemes
3. Show Show any image
4. Execute commands
5. Notify the system of events

It will be open source soon.

Here is a breif example of how to use the current options in this app. This is how you would go about setting a pre-built background color.

(All these keys are in Data.plist)

Code:
<key>WindowColor</key>
<string>Red</string>

that will set the color red. there are red, blue, green, orange, cyan, purple, brown, gray, white, black and some others i dont feel like naming yet

if you wish to have a little MORE control over what you are doing with the color, this option gives you the option to set the red, green, and blue(rgb) of the color of the background, as well as the alpha(transparency). the values range from 0-1.

Code:
<key>AdvancedWindowColor</key>
<array>
        <integer>1</integer>
        <string>0.5</string>
        <integer>0</integer>
        <string>1.0</string>
</array>

that would give an orange background.

say i want to open google

Code:
<key>URLToLaunch</key>
<string>http://google.com</string>

simple enough, yes.

showing an image. HMMMM
this lets you pick either a bundle image or an image from somehwere else in teh filesystem, and set the x, y, width, and height of it.

Code:
<key>BundleImage</key>
<array>
        <string>icon.png</string>
        <integer>160</integer>
        <integer>240</integer>
        <integer>60</integer>
        <integer>60</integer>
</array>

or …

Code:
<key>ImageAtPath</key>
<array>
        <string>/Applications/MobileSafari.app/icon.png</string>
        <integer>160</integer>
        <integer>240</integer>
        <integer>60</integer>
        <integer>60</integer>
</array>

probably the most popular, executing a set of commands, as well as giving you the ability to close teh app afterwards IF WANTED. that part isn’t needed.

Code:
<key>ExecuteCommands</key>
<array>
        <string>mkdir somedirectoryorsomething</string>
        <string>Terminate</string>
</array>

one for a few purposes is system notification. this is how set language is performed.

Code:
<key>SystemNotification</key>
<array>
        <string>com.apple.language.changed</string>
</array>

Leave a comment

You must be logged in to post a comment