Scripting Blurts
*** STILL WORKING ON THIS PAGE *** "
Blurts 2.0 introduces scripting support via an exposed document object model for
each alert type. By writing your own JScript or VBScript, you can dynamically change
the look and behavior for each alert based in the contect of the alert. For
example you can change the alert background color red when receiving an email
from a certain address, or change the sound that is played. You could even choose to
not display the alert. You can also call methods to invoke actions on your BlackBerry,
such as place a call, or send an SMS. The possibility are endless. Here is a sample
of the methods and properties exposed by the Blurts DOM.
Three objects are exposed from the Blurts scripting engine: AlertWindow, BlackBerry, and
Alert. AlertWindow object provides access to system level data and functions. BlackBerry object
provides functions to interact with the BlackBerry phone. Alert object exposes properties to
control the look and behavior of the incoming alert.
AlertWindow
Property/Method |
Description |
DataPath |
Get the full path to Blurts data folder |
AppPath |
Get the full path to Blurts app folder |
Clipboard |
Get/Set windows clipboard text |
Sleep(int) |
Suspends the current thread for specified milliseconds. |
BlackBerry
Method |
Description |
IsConnected() |
|
Connect() |
|
Disconnect() |
|
PressMenuKey() |
|
PressEscKey() |
|
PressSendKey() |
|
PressEndKey() |
|
PressSpeakerKey() |
|
PressMuteKey() |
|
PressVolumeUpKey() |
|
PressVolumeDownKey() |
|
PressKey( String key ) |
|
PressKeyEx( String key int status ) |
|
ClickTrackball() |
|
MoveTrackballUp() |
|
MoveTrackballDown() |
|
MoveTrackballLeft() |
|
MoveTrackballRight() |
|
WriteClipboard() |
|
WriteClipboard( String text ) |
|
ReadClipboard() |
|
DialPhone( String phoneNumber ) |
|
SendDTMF() |
|
SendSMS( String address, String text ) |
|
Buzz() |
|
TakeScreenCapture() |
|
GetLevelStatus() |
|
DownloadContacts() |
|
Alert
Property |
Description |
All Alert Types |
Opacity |
The level of opacity for the alert to display (0 - 100). Default is 100. |
DisplayAlert |
True to display alert, False to not display. Default is True. |
DisplayInterval |
Number of milliseconds to display alert. Default to 'Alert Display Time' in options. Default #718AF4. |
BackgroundColor |
Bottom color for background fade. |
BackgroundColorTop |
Top color for background fade. Set same as BackgroundColor for solid background color. Default #E1E7FD. |
DisplayIcon |
True to display blurts icon on alert, False to not display. Default is True. |
Priority |
Not used |
PlaySound |
True to play sound, False to not play sound. Default is True. |
SoundFile |
Full path to sound file. Default to 'Play Sound' in options. |
BatteryLevel |
Current battery strength as a percentage between 0 - 100. Read Only. |
SignalLevel |
Current signal strength, typically between -121 dBm and -40 dBm. Read Only. |
ImageFile |
Full path to contact image for this alert. No default value |
XML |
XML for this alert. Read Only. |
HTML |
HTML for this alert. Read Only. |
Call Alert |
Action |
Type of call alert: Incoming, Answered, Disconnected, Initiated, Connected, Waiting |
PhoneNumber |
Phone number of caller |
CallerName |
Display name of caller |
Email Alert |
SenderName |
Senders display name. |
SenderAddress |
Senders email address. |
ReceivingAccount |
Email that received the email. |
Subject |
Email subject text. |
BodyText |
Email body text. |
SMS Alert |
SenderName |
Senders display name. |
SenderAddress |
Senders SMS address. |
ReceivingAccount |
Email that received the email. |
BodyText |
Message text. |
DisplaySMSChat |
True to display SMS chat window. Default is false. |
BluetoothName |
Bluetooth name of BlackBerry. |
DevicePIN |
BlackBerry PIN. |
DeviceModel |
BlackBerry Model |
Connect, Status, Clipboard, and Lock Alert |
Text |
Message text |
Type of Alerts
Alert |
Function |
Description |
Connect |
OnConnectAlert() |
Occurs when Bluetooth is connected. |
Disconnect |
OnDisconnectAlert() |
Occurs when Bluetooth is disconnected. |
Status |
OnStatusAlert() |
Occurs when any status text is sent from BlackBerry, such as 'Sent Test Msg',
status message when screen capture is started, or error message. Use BlackBerry.Alert.Text property to access status message. |
Call |
OnCallAlert() |
Occurs when call status changes: Incoming, Answered, Disconnected, Initiated, Connected, Call Waiting.
Use BlackBerry.Alert.Action property to detect call status. |
Email |
OnEmailAlert() |
Occurs when a email is received. |
SMS |
OnSMSAlert() |
Occurs when a text message (SMS) is received. |
Clipboard |
OnClipBoardAlert() |
Occurs when BlackBerry clipboard text is sent to computer. Use BlackBerry.Alert.Text property to access clipcoard text.
|
Screen Capture |
OnScreenCaptureAlert() |
Occurs when BlackBerry screen cpature is sent to computer.
Use BlackBerry.Alert.ImageFile get image file name. |
Level |
OnLevelAlert() |
Occurs when BlackBerry signal strength or battery strength changes enough for the need to update UI.
Use BlackBerry.Alert.BatteryLevel and BlackBerry.Alert.SignalLevel to access level data. Note that BatteryLevel and SignalLevel status
is sent with every alert type. |
Lock |
OnLockAlert() |
Occers when workstation is locked either by disconnect for press 'L' on BlackBerry. |
Contact |
OnContactAlert() |
Occers for each contact that is download during 'Contacts download'.
Use BlackBerry.Alert.XML to get contact data |
Macro |
OnMacro() |
Occers when 'Run Macro' menu option is selected |
Click here are a sample JScript file for Blurts.
Click here are a sample VBScript file for Blurts.
Back to help page