Page 1 of 17 12345611 ... LastLast
Results 1 to 20 of 322
  1.    #1  
    Any interest in a custom today plugin or is everyone still content fighting over the today carrier line?

    Say, a plugin that lets you define your own today line, change things like text attributes (size, color, bold/normal), allows you to load your own bitmaps and modify them to indicate state changes, define your own tap-and-hold settings and specify a script to handle the settings, cycle through different text lines, all driven through writes to a registry location...

    Installer and instructions are here:
    http://discussion.treocentral.com/sh...13#post1245813

    Scuze the iphoney today screen, it's my theme-of-the-week.

    Anyways, if there is any interest in using this to spice up your scripts, let me know. I developed this for my own purposes, but can continue working on it if there's a need.

    Cheers.

    Z.
    Attached Images Attached Images
    Last edited by zbop; 04/26/2007 at 12:21 PM.
  2. #2  
    Heck throw me one if it's working correctly.
    Ive been working on one and hit a brick wall getting it to work right.
    The new 5.2 release deserves it
  3. #3  
    That would be great
    Palm III > HS Visor > Treo 600 > Treo 650 > Treo 750 > Treo Pro > PrePlus GSM

    "95% of all software issues are due to USER ERROR."
  4.    #4  
    Quote Originally Posted by slingbox View Post
    Heck throw me one if it's working correctly.
    Ive been working on one and hit a brick wall getting it to work right.
    The new 5.2 release deserves it
    Tell me about it. I hit a number of them trying to get this to work correctly

    It seems like for every 10 minutes of coding, I'd end up doing 4 hours of searching, reading, and more researching. It needs a little more work before I post it up though...
  5. #5  
    I'd pay good homage to the author if I used it.

    -- JDC
  6. #6  
    zbop is back! Looks great, I love how this area is growing in expertise.
  7. #7  
    I've got two more in the works where this would be nice
    Palm III > HS Visor > Treo 600 > Treo 650 > Treo 750 > Treo Pro > PrePlus GSM

    "95% of all software issues are due to USER ERROR."
  8.    #8  
    Quote Originally Posted by scottymomo View Post
    I've got two more in the works where this would be nice
    Hey Scotty, thanks for the feedback. Yeah I figured the need for such a beast would only grow as more people start hacking away with Mortscript

    I'm still debugging and testing at this point, but the functionality for the first version is all there. Should be soon...

    Z.
  9.    #9  
    Quote Originally Posted by jdcochran View Post
    I'd pay good homage to the author if I used it.

    -- JDC
    Haha... so Johnnie what's a "good homage" going for on ebay these days? lol
  10. #10  
    Quote Originally Posted by zbop View Post
    Haha... so Johnnie what's a "good homage" going for on ebay these days? lol
    Homage don't play dat (on Ebay).
  11.    #11  
    quick update...

    Just doing some cleanup and testing still, it's all working. I'm also seeing if there is a way that each script can be positioned and managed independently.

    Right now they are all mapped onto the same plugin space (i.e. same refresh interval and adjacent to each other).

    Z.
  12. #12  
    and i thought i was doing good with this...

    http://s4.photobucket.com/albums/y10...1177285468.pbw

    i'm glad i didn't embarass myself by posing the script. lol

    looks good buddy. hope to see more in the future.

    cody
  13. #13  
    Quote Originally Posted by codyppc View Post
    and i thought i was doing good with this...

    http://s4.photobucket.com/albums/y10...1177285468.pbw

    i'm glad i didn't embarass myself by posing the script. lol

    looks good buddy. hope to see more in the future.

    cody
    Post it, and let the carrier carrier wars begin.

    -- JDC
  14. #14  
    Quote Originally Posted by jdcochran View Post
    Post it, and let the carrier carrier wars begin.

    -- JDC
    ok, i started this thread before i saw this one. so not to highjack this thread i posted the script here... http://discussion.treocentral.com/sh...d.php?t=141624
  15. #15  
    sorry, wrong thread.
  16. #16  
    Quote Originally Posted by codyppc View Post
    ok, i started this thread before i saw this one. so not to highjack this thread i posted the script here... http://discussion.treocentral.com/sh...d.php?t=141624
    We can't all watch all the threads all the time. There's no such thing as too much code in the public domain. On a related subject, the geniuses at Microsoft were about to revolutionize the 64K DOS world with a new product called "Windows". When deciding on how big to make their programming "slate", they multiplied by 10. Bill Gates was qouted as saying: "no one will ever need to cram more than 640K of code into RAM".

    ... the first thing Windows 3.1 did was open up the area between 640K and 1 Meg.

    and we've been stuffing code ever since.

    So, keep the code coming.

    -- JDC
  17.    #17  
    Quote Originally Posted by codyppc View Post
    and i thought i was doing good with this...

    http://s4.photobucket.com/albums/y10...1177285468.pbw

    i'm glad i didn't embarass myself by posing the script. lol

    looks good buddy. hope to see more in the future.

    cody
    More options is always better, don't let that hold ya back
  18.    #18  
    Billboard is a simple today plugin that allows you to display custom information, bitmaps and menus on your today screen. Billboard is designed to operate with Mortscript, so that the complexity of coding to the today screen API in C++ can be avoided, literally you can put together your own today plugin in minutes if you can handle simple scripting.

    This post is broken into 3 sections, a simple example for beginners, an advanced example, and a reference section.

    SIMPLE EXAMPLE
    -------------------
    1) Install MortScript.
    2) Install Billboard.CAB.
    3) Create a script that updates the registry value:
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Line1 (STRING)

    For example:
    RegWriteString("HKLM", "Software\Microsoft\Today\Items\Billboard\Item1", "Line1", "Custom text")

    4) Go to Start Menu->Settings->Today->Items->Billboard and enable it.

    That's it. Obviously, your script should loop or reschedule itself to update the
    registry setting. For example, a simple script to display the battery percentage in this custom
    today plugin would be:

    Code:
    While (1)
        Battery = RegRead( "HKLM", "System\State\Battery", "Percentage" )
        RegWriteString("HKLM", "Software\Microsoft\Today\Items\Billboard\Item1",\
        "Line1", "Battery: " & Battery & "%" )
        Sleep(60000)
    EndWhile
    ADVANCED EXAMPLE
    ----------------------
    The attachment "DLLExample.zip" is a fully-functioning today plugin that should illustrate how to create your own.

    1) Install MortScript.
    2) Download and unzip DLLExample.zip
    3) Copy the folder to your Treo, doesn't matter where.
    4) Use your favorite file explorer and execute:
    "DLL_Install.mscr" under the DLLExample folder.
    5) On the today screen you should now have a "[MyClock disabled]" line,
    tap-and-hold on that line to try the various options presented.
    6) Check out the registry entries that are created by DLL_Install.mscr and the scripts in that directory to see how it works.


    REFERENCE
    --------------------
    The following registry settings show a typical billboard-based today plugin:

    HKLM\Software\Microsoft\Today\Items\Billboard\Refresh = 10
    HKLM\Software\Microsoft\Today\Items\Billboard\Selectability = 0
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Bold = 1
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Fontsize = 8
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Color = 255
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\bmp = "\Myscript\battery.bmp"
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Script = "\Myscript\batteryplugin.mscr"
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Exe = "\Myscript\MortScript.exe"
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Param1 = "Display battery"
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Param2 = "Display hours left"
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Line1 = "Battery: 95%"


    1) REGISTRY VALUES

    Refresh (DWORD)
    - Interval in seconds to reread the registry settings and refresh the plugin, the default is 15.
    If Refresh=0, changes to Line1 setting or bmp setting will be immediately visible on the today plugin.
    This is compatible with existing carrier line functionality. Note that Refresh must be set to 0 BEFORE
    the plugin is loaded to take effect.

    Selectability (DWORD)
    - Indicates whether to use one-handed navigation for the plugin. If Selectability=2, the popup
    menu can be issued by a single-click or using the DPAD center key. If Selectability=0, a
    tap-and-hold action must be used to bring up the popup menu. The default value is 2.

    Bold (DWORD)
    - Show text in bold, 0 = normal, 1 = bold, default is 1

    Fontsize (DWORD)
    - Specifies the fontsize to use, default is 8; realistically you can only
    increase/decrease this a notch or two, since I haven't implemented
    dynamic resizing of the plugin window.

    Color (DWORD)
    - Specifies the text color to use, take the RGB hex value and convert to decimal,
    then write the dword. i.e., Choose an RGB hex value from here:
    http://web.njit.edu/~kevin/rgb.txt.html
    ... and use any hex converter. Note that you color selection is probably better
    left to the user because you have no idea what their theme looks like. The default
    color is the "today text" color

    bmp (STRING)
    Specifies the fully-qualified pathname of a 16x16 transparent bitmap to use as an icon.
    The transparent color value is magenta, RGB(255,0,255). For some examples,
    download the Icons_BMP.zip file found here:
    http://www.thevbzone.com/d_IcoCur.htm

    Script (STRING)
    This is the fully-qualified pathname of the script that handles the tap-and-hold action
    on the plugin.

    Exe (STRING)
    This is the fully-qualified pathname of MortScript.exe

    Param1 (STRING)
    Specifies the first string in the popup/context menu that the user sees when they
    tap-and-hold on your plugin. Param2..Param10 specifies the other strings.

    Line1 (STRING)
    Specifies the text to display in the plugin. Line2..Line5 specifies the other
    display strings. If more than one text is found, the text will rotate to the next
    string at the next refresh interval.

    InitScript (STRING)
    This is the fully-qualified pathname of the script that handles the start and
    stop action of the plugin. If this is set, the specified script will be invoked
    with PARAM=START or PARAM=STOP when the plugin is loaded/unloaded.
    This eliminates the need for having a script in \Windows\Startup and allows
    the script to properly start/stop itself in tandem with the plugin.

    One final note, when creating your registry entries, make sure that the name of the DLL matches the name of the plugin in the registry:
    HKLM\Software\Microsoft\Today\Items\{Plugin Name}

    2) PARAM SCRIPTS

    To handle tap-and-hold selections, the specified script is executed once the user chooses
    a selection. The selection is passed in the MortScript variable "PARAM".

    i.e. in your script)

    If ( PARAM eq "LED" )
    # do whatever
    EndIf

    If you want to completely handle the settings yourself, you can (1) omit the Script and Exe
    registry settings OR (2) you can create a single Param1 such as:
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Param1 = "Settings"

    and when your script is launched you can present your own UI to modify the settings.

    3) MULTI-LINE SUPPORT

    To display multiple lines in your plugin, set up "Item2" .. "ItemN" in the registry, and initialize "Nitems" to the number of items. For example, the following entries define a 3-line display:

    HKLM\Software\Microsoft\Today\Items\Billboard\Nitems = 3 (DWORD, default value is 1)
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Line1 = "Battery: 95%"
    HKLM\Software\Microsoft\Today\Items\Billboard\Item2\Line1 = "Program Memory: 28MB free"
    HKLM\Software\Microsoft\Today\Items\Billboard\Item3\Line1 = "Storage: 13MB free"

    Additionally you can set Bold, Fontsize, or bmp per item, but the Script, Exe and Param registry entries are only valid in Item1.
    (yeah I know the terminology between Item and Line is a bit confusing, but originally the design did something else. If there is a v2.0, I'll probably have to redo the registry structure anyways).

    4) PLUGIN RESIZING BASED ON FONT SIZE

    You now have greater freedom to change your font size, as Billboard will automatically resize the plugin to make room for it. I have tested font sizes 7 through 25 for the default font. Note that if you use multiple lines, you should keep the font sizes the same for all items. Currently there may be formatting issues if you mix large font sizes with small font sizes.

    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Line1 = "8:25 PM"
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Fontsize = 25 (DWORD, default value is 8)
    HKLM\Software\Microsoft\Today\Items\Billboard\Item1\Bold = 1

    5) D-PAD MENU CYCLING

    This allows you to implement a next/previous feature that will automatically advance and select next menu item. This is useful if you set up different "views" of your plugin, which the user can cycle through by pressing the DPAD left or right. To enable this feature, set the following registry entry to a non-zero value.

    HKLM\Software\Microsoft\Today\Items\Billboard\MenuCycle = 1 (DWORD, default value is 0)

    Note that this value should reflect the active menu state at the time the plugin is loaded. For example, if the default state (view) at the time your plugin is loaded corresponds to the first menu item, you can simply leave the value as 1.

    If however, you save the user's view such that the next time the plugin is loaded, the state is not equal to the first menu item, you should update the MenuCycle value to the appropriate index into the menu. For example, lets say in you menu you allow the user to choose between:

    1) Battery
    2) Memory
    3) Storage
    4) Signal

    And let's say the current view is "Storage". If your plugin saves this choice and the next time your plugin is loaded you display a "Storage" view, then the MenuCycle value should be initialized to 3. Note, this value is only read at the time the plugin is loaded, from then on Billboard will maintain the menu state internally.

    6) SUBMENUS

    To define submenus, add registry entries of the following format:

    HKLM\Software\Microsoft\Today\Items\{Plugin}\Param#,# = "Submenu string"

    For example, if you wanted to define a "File" menu item, with submenu items of "Open", "Save", "Print", you would define the following:

    HKLM\Software\Microsoft\Today\Items\{Plugin}\Param1 = "File"
    HKLM\Software\Microsoft\Today\Items\{Plugin}\Param1,1 = "Open"
    HKLM\Software\Microsoft\Today\Items\{Plugin}\Param1,2 = "Save"
    HKLM\Software\Microsoft\Today\Items\{Plugin}\Param1,3 = "Print"

    There is currently a limit of 10 top-level menu items and 20 items per sub-menu.

    6.1) Checked items
    You can create checkmarks next to a menu item to indicate the state of a particular menu item. This is indicated by prefixing a "c:" to the menu item text, as shown here.

    HKLM\Software\Microsoft\Today\Items\{Plugin}\Param1 = "Bluetooth"
    HKLM\Software\Microsoft\Today\Items\{Plugin}\Param1,1 = "c:On"
    HKLM\Software\Microsoft\Today\Items\{Plugin}\Param1,2 = "Off"

    This effect can be used in the top-level menu or the submenus. Note: it is the responsibility of the script writer to make sure the state shown in the menus is consistent with the state of their plugin.

    6.2) Grayed-out items
    You can temporarily disable menu items to indicate that they cannot be selected by graying them out. This is indicated by prefixing a "g:" in front of the menu text.

    HKLM\Software\Microsoft\Today\Items\{Plugin}\Param3 = "g:GPS"

    6.3) Separators
    You can add horizontal separators to logically separate parts of the menu (this can be done with either top-level menus or submenus). This is indicated by adding a menu item with text that begins with "s:" (any text after that is ignored).

    HKLM\Software\Microsoft\Today\Items\{Plugin}\Param4 = "s:"

    Once the menu item is selected by the user, you script is invoked with the variables PARAM and SUBPARAM with the value chosen. If no submenu is used in the selection, SUBPARAM is set to an empty string "". Note, the value passed will include the "c:" designator if it is currently checkmarked.

    The following screenshots show an mock weather plugin menu utilizing these features:



    And these are the corresponding registry entries for those menus:

    ITEM = "Software\Microsoft\Today\Items\MockWeather\Item1"
    RegWriteString( "HKLM", ITEM, "bmp", DIR \ "sun.bmp" )
    RegWriteString( "HKLM", ITEM, "Line1", "59F Sunny 10mph NE" )
    RegWriteString( "HKLM", ITEM, "Param1", "Display" )
    RegWriteString( "HKLM", ITEM, "Param1,1", "c:Temperature" )
    RegWriteString( "HKLM", ITEM, "Param1,2", "c:Forecast" )
    RegWriteString( "HKLM", ITEM, "Param1,3", "Wind" )
    RegWriteString( "HKLM", ITEM, "Param1,4", "Barometric" )
    RegWriteString( "HKLM", ITEM, "Param1,5", "c:Visibility" )
    RegWriteString( "HKLM", ITEM, "Param2", "Location" )
    RegWriteString( "HKLM", ITEM, "Param3", "Interval" )
    RegWriteString( "HKLM", ITEM, "Param4", "g:Radar" )
    RegWriteString( "HKLM", ITEM, "Param5", "Settings" )
    RegWriteString( "HKLM", ITEM, "Param6", "s:" )
    RegWriteString( "HKLM", ITEM, "Param7", "About" )

    Note: if you define submenus, it will automatically disable the menu-cycling feature. I just couldn't find a scenario where it made sense.

    Attachments
    Billboard.CAB (use for the simple example)
    DLLExample.zip (use for the advanced example)
    Billboard.zip (use to update your DLL to the latest)
    Attached Files Attached Files
    Last edited by zbop; 11/14/2008 at 12:06 PM.
  19. #19  
    Cool! Perhaps if necessary you can create separate plugins for our apps if folks want to display data from multiple apps simultaneously?
    Palm III > HS Visor > Treo 600 > Treo 650 > Treo 750 > Treo Pro > PrePlus GSM

    "95% of all software issues are due to USER ERROR."
  20.    #20  
    Couple of other notes:

    If you get to the point where you want to distribute this plugin with your script, I'll post a DLL and instructions. I've actually coded the plugin in such a way that multiple instances of this DLL can be loaded so each script developer can use their own private version, which means that you can rename the plugin to whatever you want, you can enable it independently, and you can position it on the today screen, independently of others. You can also bundle the DLL with your own installer, you'll just need to create the appropriate registry entries to enable the DLL upon install.

    However, if everyone wants to share the same line instead and conserve space, I'd suggest you check out Cody's fine "carrier date" project

    One other thing, the plugin has a safeguard that disables itself on certain resets; today plugins can wreak havoc if they aren't working properly. The safeguard is there JUST in case there are any latent bugs, but as we all knoooowwwww I don't have any bugs in my code ( Hannip stop laughing!! )

    Of course, I'll remove the safeguard if anyone wants to distribute this and if there are no issues.

    Cheers.

    Z.
Page 1 of 17 12345611 ... LastLast

Posting Permissions