Related sites:
More related sites:

Naurtech Support Wiki

Navigation: Print | Search | Wiki Home | Back to www.naurtech.com

Support Topics

  • Home
  • Usage Videos
  • Scripting
  • Web Browser
  • Download & Setup
  • License Registration
  • Cold Boot Persistence
  • Barcode Scanner
  • Remapping keys
  • Sounds & Tones
  • Lockdown & Fullscreen
  • Misc. & Usage Tips
  • Tools & Utilities

Wiki Actions

  • View
  • Edit
  • Print
Naurtech Corporation Copyright. All rights reserved.

Dynamically reposition an Indicator in a Browser session

This script shows how you can reposition an Indicator icon to a different position on the screen. It implements a handler which is invoked when ever the a session is switched to another active session.

  • This script handles positioning of the RF Signal Strength indicator to different positions for each session. When you switch to a session, the RF signal strength indicator is repositioned appropriately for that session.
  • This script assumes that the RF Signal strength indicators are enabled in both sessions.

The AddMetaItem interface of the Browser object actually writes a META tag to the HTML for the web page. The line CETerm.PostIDA(“IDA_INFO_REFRESH ”,0 ) is required to apply the changes to the web page.

To download this sample, Right mouse click and select "Save Target As..." RepositionSignalMeter.js
To load and run the script, see this article.


/*OnSessionSwitch()*/
// Move RF signal strength according to the switched active session
function OnSessionSwitch( session, previousSession )
{
    var b = CETerm.Session(session).Browser;

    if (b.DocLoaded)
    {
        if (session == 1)
        {
            b.AddMetaItem("Signal", "x=195");
            b.AddMetaItem("Signal", "y=2");
        }
        else
        {
            b.AddMetaItem("Signal", "x=10");
            b.AddMetaItem("Signal", "y=100");
        }
        CETerm.PostIDA("IDA_INFO_REFRESH", 0);
    }
}

The article is provided as a service to current and perspective Naurtech customers. Trademark references made to various companies and their products belong to the respective companies. All information is provided as is. For questions, please contact us at  support@naurtech.com.