swzoh wrote:
> You need to excute it twice if you want to untick-then-tick. However,
> I'm wondering just the following could make the job done:
> win.keys(?"{to ^+Wireless*}%w{space}{tab 2}{enter}")
>   

Sean, I'll grab your file in a mo -- thank you! -- but look at the 
win.keys way here..

I can't get your example above to work, if I remove the error suppressor 
I get "can't find window Wireless*" errors, but I'd been playing around 
with sending keys anyway & had come up with the following:

global c = 0
@findIcon
trayicon.right("=explorer("++wirelessIconId++")")
win.keys("{au}{en}")
wait.for(10000, visiblewindow("c=CabinetWClass"))
if (not visiblewindow("c=CabinetWClass")) do
    messagebox("warning ok", "Can't find window... exiting.", "Wireless 
icon toggler")
    quit
else
    wirelessIconId = wirelessIconId + 1
endif
@toggleTick
wait.for(1000)
win.keys("{to Network*}w%{en}")
wait.for(10000, visiblewindow("Wireless Connection Properties"))
wait.for(500)
win.keys("{to Wireless*}%w{ta}{en}")
if (c==0) do
    c = 1
    [EMAIL PROTECTED]
endif
Window.Close_("Network*")
quit


which works. I need a global var (wirelessIconId) for icon id as it 
changes whenever I toggle it.

Also, visiblewindow(), anywindow(), etc, don't seem to work when 
checking the caption of the "Network & Dial-up Connections" dialog..? 
actually neither does "Wireless Conn. Properties".

Will give your file a try the morning too, thanks again for your help!!

Cheers
Karen




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/

<*> 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