As previously discussed on these threads (
1 2 ), I decided to create a simple date script, using Mortscript. The script displays todays date on the field where the carrier logo is shown (see image)...
As you know, having a 240x240 screen makes every space prime real estate. There are a few apps that could achieve what my script does...Hidelogo (hides the carrier logo field), TrueToolbar (display lower tray), BTIcon (displays bluetooth icon in lower tray of TrueToolbar), and TodayDate (displays todays date on Today screen).
I liked the Bluetooth icon on the carrier logo field, because it changes color if a device is connected. Using the BTicon app, the only way I could tell if my headset was still connected would be by calling my voicemail to see if I can hear through the headset.
Therefore, after some research, I developed a simple script to achieve the above...
Code:
# Author: Crazie.Eddie@Flashmail.com
# Description: Carrier line date replacement
# Version: 2.4 Beta
# Mortscript ver: 4.0
# Supported PPC: Treo 700wx (WM5)
#
# CHANGE LOG:
# 2007.04.05 - Initial creation (CE)
# 2007.04.07 - Write to logo field into a seperate module (CE)
# 2007.04.08 - Aborted seperate module to write to logo (CE)
# 2007.04.09 - Create ini file (CE)
# 2007.04.10 - Script establishes it's own script name and path (CE)
# 2007.04.12 - Made functional on a 750, as well as 700w/wx (CE)
# 2007.04.14 - Mortscript SOP compliant (CE)
# 2007.04.14 - Aborted ini scripting (CE)
# 2007.04.31 - Replaced RunAt with Sleep, due to increased battery usage (CE)
# 2007.05.03 - Shorted month names, due to character limitation on field. (CE)
# 2007.05.04 - Checked if registries exist. Terminate if they do not. (CE)
# 2007.05.05 - Abort check registries. Compatible with Mortscript 4.01. (CE)
#
##################################################################
#
ThisScriptPath = SystemPath("ScriptPath")
ThisScriptName = SystemPath("ScriptName") & SystemPath("ScriptExt")
ThisScript = ThisScriptPath \ ThisScriptName
# ================================================================
While(1)
# ================================================================
#
# If the script is somehow removed, it will terminate.
# Used for script testing by placing script on SD card.
# ----------------------------------------------------------------
#
If (NOT FileExists(ThisScript ))
Message(ThisScriptName & " has been removed, script will terminate. " \
& "Please turn phone radio OFF, then turn phone radio " \
& "ON to restore carrier line.", "SCRIPT ERROR")
EXIT
EndIf
# ================================================================
#
# Determines current month by name. Assigns each month into an
# array.
# ----------------------------------------------------------------
MonthVal=FormatTime("m")
MonthName["01"]="Jan"
MonthName["02"]="Feb"
MonthName["03"]="Mar"
MonthName["04"]="Apr"
MonthName["05"]="May"
MonthName["06"]="Jun"
MonthName["07"]="Jul"
MonthName["08"]="Aug"
MonthName["09"]="Sept"
MonthName["10"]="Oct"
MonthName["11"]="Nov"
MonthName["12"]="Dec"
# ================================================================
#
# Determines current day by name. Assigns each day into an array
#
# ----------------------------------------------------------------
DayVal=FormatTime("w")
DayName["0"]="Sunday"
DayName["1"]="Monday"
DayName["2"]="Tuesday"
DayName["3"]="Wednesday"
DayName["4"]="Thursday"
DayName["5"]="Friday"
DayName["6"]="Saturday"
# ================================================================
#
# Retrieves the current date and year, then combines to display
# the field (example Friday, Apr 06, 2007)
#
# ----------------------------------------------------------------
GetTime Date, " d, Y"
DisplayDate = DayName[DayVal] & ", " & MonthName[MonthVal] & Date
# ================================================================
#
# Writes the date in the carrier field
#
# HKLM\System\State\Phone\Current Operator Name (Treo700wx & 750)
# HKLM\Software\Microsoft\Ril (Treo700 ONLY)
#
# ----------------------------------------------------------------
# PlaySound("\Windows\Default.wav")
RegWriteString ("HKLM","Software\Microsoft\Ril","CarrierName", DisplayDate)
RegWriteString ("HKLM","System\State\Phone","Current Operator Name", DisplayDate)
# ================================================================
#
# Waits 60 seconds, before restarting loop.
#
# ----------------------------------------------------------------
GetTime SleepVal, "s"
SleepTime = ((60 - SleepVal) * 1075)
Sleep (SleepTime)
EndWhile
VERSION:
2.4 Beta
CHANGE LOG:
2007.04.05 - Initial creation
2007.04.07 - Write to logo field into a seperate module
2007.04.08 - Aborted seperate module to write to logo
2007.04.09 - Create ini file
2007.04.10 - Script establishes it's own script name and path
2007.04.12 - Made functional on a 750, as well as 700w/wx
2007.04.14 - Mortscript SOP compliant
2007.04.14 - Aborted ini scripting
2007.04.31 - Replaced RunAt with Sleep, due to increased battery usage
2007.05.03 - Shorted month names, due to character limitation on field.
2007.05.04 - Checked if registries exist. Terminate if they do not.
2007.05.05 - Abort check registries.
Now compatible with Mortscript 4.01.
Install Instructions:
1. Uninstall any previous versions and perform a soft reset.
2. Download and extract the zip file.
3. Copy the extracted cDate.CAB file onto your device.
4. Click on cDate.CAB on your device to execute the installation.
5. Perform a soft reset once the installation is complete.
Cab files performs:
1. Installs to
\Windows\Programs\Start Menu\Mortscript
2. Creates shortcut in \Windows\Programs
3. Creates shortcut in \Windows\Startup
4. Uninstall option
Mortscript.exe must installed and registered on your device
-----------------------------------------------------------------------------------------------------
Other carrier plugins:
Treo Alert - Tested and functions well with Treo Alert 4.8
XCast - Will be testing in the future.
Future cDate Releases:
- Select field to activate Clock app
- Convert to exe
- Hourly chime (user configurable)