I have been through the helpfile and from what I've read regarding cl
functions the following script should change the icon on my bar to
reflect the state of muting of sound but my bar is not showing the
icon.  The win.debug commands verified that the correct part of the if
was being executed and that I was referencing the correct item of the
bar and the cl.IsIconVisible("(Bar)", 2) indicates the icon is visible
but no icon on the bar is to be seen.

The first time this script runs the icon disappears and it never
reappears.

if (muted) do
*exec mute
; Win.Debug("muted = ", muted)
; win.debug(cl.GetTooltipValue("(Bar)", 2))
cl.SetIcon ("(Bar)", 2, "D:\Program Files\PowerPro\Icons\Sysicons.icl", 105)
cl.SetIconVisible ("(Bar)", 2,1)
; cl.redisplay("(Bar)")
; Win.Debug( cl.IsIconVisible("(Bar)", 2) )
else 
*exec mute
; Win.Debug("else ", "muted = ", muted)
; Win.Debug( cl.IsIconVisible("(Bar)", 2) )
cl.SetIcon ("(Bar)", 2, "D:\Program Files\PowerPro\Icons\Sysicons.icl", 104)
cl.SetIconVisible ("(Bar)", 2,1)
; cl.redisplay("(Bar)")
; Win.Debug( cl.IsIconVisible("(Bar)", 2) )
endif


An export of the bar:

[(Bar):Properties]
Format1 = IconSize: 16 Position: Floating ShowIfBump: NearestEdge
Format2 = Height: 20 MaxText: 63
Format3 = TopMost Tooltips AllVDesks AutoShowBar ActiveSubbar
Format4 = TextCenter BarSize

[1]
id = dt_tm
Label = *Info ddd MMM dd
Tooltip = M: Show Calendar  ŠR:  PowerPro Help
Format = back: 255 207 185 Width: 62
LCmd1 = gvDateTimeCtr
LParam1 = = (gvDateTimeCtr + 1) % 3
LCmd2 = cl.SetLabel("Bar",
LParam2 = "dt_tm", ifelse(gvDateTimeCtr == 0, "*Info ddd MMM dd", "*Info 
HH:mm"))
MCmd1 = *Exec
MParam1 = Calendar
RCmd1 = "&(pprofolder)PowerPro.HLP"

[2]
Label = desktop
Tooltip = L: Control Panel, DesktopŠM: My ComputerŠR: Desktop Configure
Format = back: 0 255 64
LCmd1 = *Menu
LParam1 = Folder control panel,desktop
LWork1 = folderdots foldertop sorttime Maxtext 72
MCmd1 = *Menu
MParam1 = Folder my computer
MWork1 = foldertop Maxtext 32
RCmd1 = *Menu
RParam1 = ShowAtButton MENU-all-desk
RWork1 = folderdots foldertop Maxtext 60

[3]
id = snd
Label = *info expr(volume*100/255)%
Tooltip = *info expr(volume*100/255)%ŠŠL: increase volumeŠM: mute volume ŠR: 
decrease volume
Icon =Icons\sysicons.icl,103
Format = back: 168 211 255 Width: 50
LCmd1 = *Exec
LParam1 = VolumeAll +13
MCmd1 = *Script
MParam1 = RunFile "D:\Program Files\PowerPro\scripts\soundonoff.powerpro"
RCmd1 = *Exec
RParam1 = VolumeAll -13

[4]
Tooltip = KEditŠwordpadŠQikEdit
Icon =d:\Utils\Kankowski Edit\kedit.exe,0
LCmd1 = D:\Utils\Kankowski Edit\kedit.exe
MCmd1 = wordpad.exe
RCmd1 = d:\Utils\qikedit\qeditor.exe

[5]
Label = Post-It Notes
Tooltip = L:   Make new Stickie Note ...ŠM:  Show or Hide all hidden notes 
...ŠR:  Notes Menu ...//(POST-IT NOTES)/Š"M" means click both the left and 
right buttons on the mouse.
Icon =icons\Sticky_Notes.icl,0
Format = back: 255 255 128 Width: 86
LCmd1 = *Note
LParam1 = Open 
MCmd1 = *Note
MParam1 = ShowHideOpen *
RCmd1 = *Menu
RParam1 = Show Notes

[6]
Label = Utils
Tooltip = L: Utils directoryŠM:   ŠR: Utility launch menu
Format = back: 255 0 0 Width: -2
LCmd1 = *Menu
LParam1 = Folder D:\Utils\
LWork1 = folderdots embed tooltips Maxtext 48  .exe .com .bat .chm .hlp   
Exclude "d:\utils\arch, d:\utils\bicpu, d:\utils\xpdf, d:\utils\Kankowski Edit, 
d:\uitls\toclip" 
MCmd1 = (none)
RCmd1 = *Menu
RParam1 = ShowAtButton Main

[7]
Tooltip = Logged Timer
Icon =D:\Program Files\PowerPro\Icons\Iconlib.icl,172
LCmd1 = *Timer
LParam1 = StartStop s
MCmd1 = (none)
RCmd1 = D:\Utils\Kankowski Edit\kedit.exe
RParam1 = D:\Program Files\PowerPro\pproconf.timerlog

[8]
Label = The Bat!
LCmd1 = *Format
LParam1 = StartSubBar
MCmd1 = (none)
RCmd1 = (none)

[9]
Label = TheBat
LCmd1 = *Bar
LParam1 = SelectSubBar TheBat
MCmd1 = (none)
RCmd1 = (none)

[10]
LCmd1 = *Format
LParam1 = EndSubBar
MCmd1 = (none)
RCmd1 = (none)



-- 
Best regards,
 Brian Marcotte
Using The Bat! v3.85.03 on Windows XP 5.1 Build 2600 Service Pack 2



Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to