EventScripts Icon

Scripting EventScripts

The EventScripts application is itself scriptable. You can script EventScripts to send custom notifications to iOS devices as well as add and remove scripts from events. For more information check out the example below, as well as the AppleScript dictionary for EventScripts.

Notification Scripts

You may want to send a custom notification from a script triggered by EventScripts to your iOS device. You can do this by scripting the EventScripts application itself. EventScripts supports two of the most popular notification apps for the iPhone and iPad; Prowl and Pushover.

Prowl Notifications

You can script EventScripts directly to send prowl notifications to your iOS device. You will need your prowl API key, which can be obtained here.

-- Get an API key from https://www.prowlapp.com/api_settings.php and replace "YourProwlAPIKeyInHere" below with the key.


set prowlMsg to "Hello World"

set apiKey to "YourProwlAPIKeyInHere"


-- priority setting:  -2=Very Low,-1=Moderate, 0=Normal, 1=High ,2=Emergency


tell application "EventScripts"

set theResult to send prowl prowlMsg using API key apiKey from application "EventScripts" at priority -1

end tell


if theResult then

display dialog "Prowl message sent ok"

else

display dialog "Prowl message failed to be sent"

end if

Pushover Notifications

You can script EventScripts directly to send pushover notifications to your iOS device. You will need your pushover user key, which can be obtained here.

-- Get an User key from https://pushover.net and replace "YourPushoverUserKey" below with the key.


set pushoverMsg to "Hello World"

set userKey to "YourPushoverUserKey"



tell application "EventScripts"

set theResult to send pushover pushoverMsg using user key userKey

end tell


if theResult then

display dialog "Pushover message sent ok"

else

display dialog "Pushover message failed to be sent"

end if

Here's a very slightly more involved example

-- Get an User key from https://pushover.net and replace "YourPushoverUserKey" below with the key.


set pushoverMsg to "Hello World"

set userKey to "YourPushoverUserKey"


tell application "EventScripts"

set theResult to send pushover pushoverMsg using user key userKey for device "iPad" with title "EventScripts message" with sound "mechanical"

end tell


-- NB

-- the parameters 'with url' and 'with url title' are currently unimplemented

-- and should not be used. This will be fixed in a future version


if theResult then

display dialog "Pushover message sent ok"

else

display dialog "Pushover message failed to be sent"

end if