[jawsscripts] Re: Scripting System Tray icons

  • From: "Donald Marang" <donald.marang@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Fri, 10 Apr 2009 19:46:33 -0400

I have found this script very useful!  I have modified it slightly for my 
taste.  I wanted to have it report the standard Vista network status and the 
status for my Dell wireless card.  In order for my Dell wireless status to 
show up , I had to do the following in the Taskbar Control panel:

1.  Open the Vista Taskbar Control Panel.

2.  Press Control + Tab twice to get to the Notification Area page.

3.  Press space to uncheck the "Hide inactive icons" if currently checked. 
This will enable the button in the following step.

4.  Press Tab to go to the "Icons  Customize ..." button and press space to 
activate the button.

5.  Arrow down the list until you hear a Notification Area icon that has a 
behavior that you want to change.  Aftr each icon, it will indicate if the 
current behavior is "Hide", "Hide when inactive", or "Show".  This behavior 
is in a combo box in a second column of this list view.  There is a special 
trick hotkey that seems to work in this dialog to get access to this combo 
box.  If you use this special hotkey of, Control + right arrow here, it will 
allow you to then arrow through the options and select "Show" and press 
Enter.  This will take you out of the list!  For some reason, there is a 
quirk in this dialog.  The changes I made would onlry take effect if I 
completely exited the control panel and entered over and over again to 
change the behavior of one icon at a time!  If I would  press space on the 
"Icons  Customize ..." button again before pressing Ok and closing the 
Control Panel, the special hotkey will not work!

6.  Press Tab until you hear "System icons  Network".

7.  Press Space to check the "System icons  Network" checkbox if not already 
checked.

8.  Press Tab until you get to the Ok button and press Space to save the 
changes and close the Control Panel.

9.  Repeat the above steps until all of the desired System Tray icons that 
you want to aclways show are set to "Show" in the behavior column.

I adjusted the script as follows and placed in one of my default script 
files.  I modified the loop to continueuing through the System Tray icons 
and adjusted the search strings and the Say statements.

Script NetworkStatus ()
;Based on the Script SayBatteryLevel ()
; Originally written by S. Dawes
var
 int Index,
 int iFound,
 String STItem

Let Index = SysTrayGetItemCount ()
While (Index >= 1)
 Let STItem = SysTrayGetItemToolTip (Index)
 If StringContains (STItem, "SSID:") then
  SayMessage (ot_status, "Wireless:  " + STItem )
  ; Let Index = 0
  Let iFound = TRUE;
 ElIf StringContains (STItem, "connected") then
  SayMessage (ot_status, "Network:  " + STItem )
  ; Let Index = 0
  Let iFound = TRUE;
 EndIf
 Let Index = Index - 1
EndWhile
If ! iFound then
 SayFormattedMessage (OT_ERROR, "Wireless Network Connection status could 
not be retrieved")
EndIf

EndScript

Don Marang


----- Original Message ----- 
From: "Rui Fontes" <rui.fontes@xxxxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Thursday, April 09, 2009 6:30 AM
Subject: [jawsscripts] Re: Scripting System Tray icons


> Go to Panel Control, Taskbar and Start Menu, and uncheck the two check 
> boxes
> saying something like Hide unused icons and Hide similar icons.
>
> Rui
>
> ----- Original Message ----- 
> From: "Steven Hicks(HICKSSM)" <Steven.HicksSM@xxxxxxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Thursday, April 09, 2009 7:17 AM
> Subject: [jawsscripts] Re: Scripting System Tray icons
>
>
> Hi,
>
> not sure if you can help any further, when I boot my machine up, for some
> strange reason, the Wireless network connection icon in the system tray
> doesn't seem to show up.  I have checked and it is set up on the task bar 
> to
> always show.  If I go in to the task bar and arrow down to always show 
> which
> it is on already then click o.k. for some odd reason, it then appears back
> in the system tray again.
>
> ----- Original Message ----- 
> From: "James Scholes" <james@xxxxxxxxxxxxx>
> To: "Sean Randall" <jawsscripts@xxxxxxxxxxxxx>
> Sent: Friday, April 03, 2009 4:35 PM
> Subject: [jawsscripts] Re: Scripting System Tray icons
>
>
>> Try the following script (note that this only works if you have 1 active
>> wireless connection):
>> --Script Code Starts Here--
>> ;Based on the Script SayBatteryLevel ()
>> ; Originally written by S. Dawes
>> var
>> int Index,
>> int iFound,
>> String STItem
>> Let Index = SysTrayGetItemCount ()
>> While (Index >= 1)
>> Let STItem = SysTrayGetItemToolTip (Index)
>> If StringContains (STItem, "Wireless Network Connection") then
>> SayMessage (ot_status, STItem )
>> Let Index = 0
>> Let iFound = TRUE;
>> Else
>> Let Index = Index - 1
>> EndIf
>> EndWhile
>> If ! iFound then
>> SayFormattedMessage (OT_ERROR, "Wireless Network Connection status could
>> not be retrieved")
>> EndIf
>> --Script Code Ends Here--
>>
>>
>> --This message is a reply to Sean Randall. The subject of the original
>> message was '[jawsscripts] Re: Scripting System Tray icons'. Original
>> message text has been omitted.--
>>
>> JLS Radio is no more! Instead, check out my new blog at:
>> http://www.jls-radio.com
>> --
>> James Scholes
>> --
>> Contact Details
>> --
>> E-mail: james@xxxxxxxxxxxxxxxx
>> MSN/Windows Live Messenger: jamesscholes@xxxxxxx
>> AIM: JamesScholes000
>> Skype: james.scholes
>> --
>> Social Networks
>> --
>> Twitter: http://www.twitter.com/jamesscholes
>> Find me on Facebook! Username: jamesscholes
>> Link to Facebook profile:
>> http://www.facebook.com/profile.php?id=1375965156&hiq=jamesscholes
>> Last.FM Profile: http://www.last.fm/user/jamesscholes000
>> --
>> Message sent at 04:31:25 PM GMT on Friday, April 03, 2009
>>
>> __________
>> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>>
>> View the list's information and change your settings at
>> http://www.freelists.org/list/jawsscripts
>>
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
> 

__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: