Skip to content
Tim Debo edited this page Jun 2, 2014 · 4 revisions

This documentation is subject to change. 2 June 2014

MacGap2 exposes an object called macgap inside JavaScript. The methods exposed by this API are documented below:

Object description
App application methods: quit, activate, hide, unhide, beep, bounce, open('url'), launch, setCustomUserAgent, systemIdleTime
Clipboard  copy, paste
Window open, resize, getX, getY, move, toggleFullscreen, maximize, minimize, isMaximized
Path application, resource, documents, library, home, temp
Sound play, playSystem
Growl notify
Notice notify
Fonts availableFonts, availableFontFamilies, availableMembersOfFontFamily
Events wake, sleep, appActivated
Menus addItem, addSeparator, remove, setCallback, setKey, setTitle
User Defaults getUserDefaultsKeys, getMyDefaults, setString, setInteger, setBool, setFloat, getString, getInteger, getBool, getFloat

MacGap1 Commands deprecated in MacGap2

Object description
Dock badge
Path Command Removed: all path commands are now properties of the MacGap object itself
User Defaults Command significantly changed - see API reference for new usage
App Command Removed: all commands/properties are now part of the root macgap object. See API Reference for details
Clone this wiki locally