The source code for the various buttons used by Big Buttons
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
answer_skype Answering skype now also hangs up on skype Apr 26, 2012
arrow_down Can now use key codes instead of AppleScript for simple commands Apr 22, 2012
arrow_left Can now use key codes instead of AppleScript for simple commands Apr 22, 2012
arrow_right Can now use key codes instead of AppleScript for simple commands Apr 22, 2012
arrow_up Can now use key codes instead of AppleScript for simple commands Apr 22, 2012
decrease_volume Turns out the key codes don't work so well for volume controls. Rever… Apr 22, 2012
enter_key Can now use key codes instead of AppleScript for simple commands Apr 22, 2012
increase_volume Turns out the key codes don't work so well for volume controls. Rever… Apr 22, 2012
mute Turns out the key codes don't work so well for volume controls. Rever… Apr 22, 2012
mute_skype Made the buttons retina sized Apr 7, 2012
next_itunes_track Made the buttons retina sized Apr 7, 2012
next_spotify_song Update spotify to use Applescript Apr 17, 2012
play_chrome_video Can now use key codes instead of AppleScript for simple commands Apr 22, 2012
play_itunes Made the buttons retina sized Apr 7, 2012
play_spotify Update spotify to use Applescript Apr 17, 2012
play_vlc Made the buttons retina sized Apr 7, 2012
sleep Made the buttons retina sized Apr 7, 2012
starcraft_idle_worker Make starcraft idle worker use key code to speed things up Apr 22, 2012
switch_to_next_app Made the buttons retina sized Apr 7, 2012
tab_key
README.markdown Updated README to add the hot new key_code ability. Apr 22, 2012

README.markdown

Big Buttons

Big Buttons is an iPhone app that lets you control your Mac with your iPhone. It does this by calling scripts on your Mac that YOU can design.

All of the scripted commands are just plain old Applescript, so it's easy to make your own.

I've also included the PSDs of the button icons, so you can copy how the buttons are created and keep the same kind of style (if you want).

Please let me know if you create any truly awesome buttons, and I'll merge the code in here and include them in the next update of Big Buttons.

Find out more about the App here: http://bigbuttonsapp.com

How do I make my own buttons?

  1. On the server open up your buttons folder and create a new directory for your new button
  2. In order for a button it needs 3 files: a script file, an icon, and a configuration file. The configuration file must be called config.json, the script file must be named after the directory name with an .applescript extension and the icon must be named icon.png.
  3. The json file can take numerous params:

    title:       This is what is shown in the server as the name of the button
    

    Optional:

      description: Any extra details you may want to impart (like does the button require GUI scripting?)
      application: The name of the application
      action:      The action you're performing on the application
      key_code:    If you only want to control a single keypress then you don't need to create an AppleScript for this. 
                   Instead input the integer value of the key code you want.  
                   You can find a list of key codes at 
                   /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h 
    
  4. The icon image must be a square, it doesn't matter how big it is - the larger the image the bigger the resolution, but the slower it will take to get to the phone. Make sure you name the icon "icon.png"

  5. The AppleScript file is just plain old AppleScript. There's a great tutorial here: http://mac.appstorm.net/how-to/applescript/the-ultimate-beginners-guide-to-applescript/
  6. After you've created your button, restart the server and your new button will appear in the available buttons list.

Chris O'Sullivan :bowtie:

http://www.thechrisoshow.com