Jump to content
Sign in to follow this  
Chinesegirl

about windows taskbar

Recommended Posts

Chinesegirl

Hello, everyone, I need your help

How to return the status of windows taskbar ,Hide or show ?

Share this post


Link to post
Share on other sites
Uten

Hi,

Welcome to the forum. Nice first question if I may say so..:)

This will get you the handle. Search for Shell_TrayWnd for more info.

Func testTrayBar()
   opt("WinTitleMatchMode",4)
   dbg(WinGetHandle("classname=Shell_TrayWnd"))
EndFunc

Happy scripting.

Share this post


Link to post
Share on other sites
Chinesegirl

Hi,

Welcome to the forum. Nice first question if I may say so..:)

This will get you the handle. Search for Shell_TrayWnd for more info.

Func testTrayBar()
   opt("WinTitleMatchMode",4)
   dbg(WinGetHandle("classname=Shell_TrayWnd"))
EndFunc

Happy scripting.

Thank you for your help.Thanks any way

Share this post


Link to post
Share on other sites
Chinesegirl

whatever hidden or show,All return the same result . It is impossible to judge the status of windows taskbar

All result showed 0*0003004c

which language is "DBG"?

run "dbg" tip error !

As follows:

"ERROR: dbg(): undefined function. dbg(WinGetHandle("classname=Shell_TrayWnd"))"

Thanks

Share this post


Link to post
Share on other sites
Uten

I did not provide all the code to do what you want. I did however provide the most important part to figure out what you want in the forum. It has been done before. Like most things. So, did you do a search for +classname +Shell_TrayWnd ???

dbg is a udf (my own). From the code you should be able to figure out how it works. Even a search would have helped as I have posted it several times the last week. But, ok, from the top of my head:

Func dbg($msg, $erl=@ScriptLineNumber, $err=@Error, $ext=@Extended)
    ;NOTE: Double click on a line with this format in SciTE will make it jump to the line in the current buffer.
    ConsoleWrite("(" & $erl & ") := (" & $err & ")(" & $ext &  "): " & $msg & @LF)
    If $err <> 0 OR $ext <> 0 Then Return SetError($err, $ext, 0)
    Return 1
EndFunc

So, all you get from the code in my first post is a window handle. That handle can be used in other Win* functions to figure out if the window is visible or not. I'm not on windows now so I can't help with that at the moment, sorry.

There is another solution to. The start button has a rather specific icon in it. SO you could use PixcelGetColor at the startbuttons coordinates (the red and blue area) to figure out if it is visible or not.

Happy Scripting

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.