Spare-Code

Helper Functions

app_msg()

int32 app_msg()

Returns the identifier of Snarl's application registered Windows message.


create_password()

str create_password(int16 Chars = 32)

Returns a suitably unique password.


make_path()

str make_path(str Path)

Ensures Path ends with a backslash.


snarl_ez_notify()

int32 snarl_ez_notify(str Labelstr Command)

Adds an action to the object.  When a notification is created, Label will be displayed in the notification's actions menu and Command will be returned via the SnarlApp.NotificationActionSelected event.

Note: Although it is legal to have multiple actions each with the same name and command in this object, Snarl will filter the actions before adding them to the notification.  Generally speaking, you should avoid using multiple actions with either the same Label, the same Command, or a mixture of both.

Add does not return a success value; to determine if the action was added successfully, do the following:

n = myActions.Count()
myActions.Add("foo", "bar")
WasSuccessful = (myActions.Count() = (n+1)


snarl_msg()

int32 snarl_msg()

Returns the identifier of Snarl's application registered Windows message.


snarl_register()

int32 snarl_ez_notify(str Labelstr Command)

Returns the identifier of Snarl's application registered Windows message.


snarl_unregister()


int32 snarl_unregister(str Signaturestr Password = "")

Unregisters the application previously registered with Signature.  If a password was provided when the application was registered, it must be passed in Password.


snarl_version()

int32 snarl_version()

Returns the version number of the currently running Snarl instance.

Comments