It is currently December 11th, 2018, 2:33 pm

Function for sensing taskbar state when in autohide

General topics related to Rainmeter.
User avatar
balala
Rainmeter Sage
Posts: 7155
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Function for sensing taskbar state when in autohide

balala » November 5th, 2018, 7:45 pm

jsmorley wrote:
November 5th, 2018, 7:41 pm
Yes, but knowing it is set to auto-hide is not his issue. He can get that from the registry. The issue that he is trying to solve is "is it UP or DOWN at this moment, and those variables won't help with that.
Yes, I think in the meantime I realized I misunderstood the initial ask. :???: Sorry...
User avatar
jsmorley
Developer
Posts: 18451
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Function for sensing taskbar state when in autohide

jsmorley » November 5th, 2018, 7:49 pm

balala wrote:
November 5th, 2018, 7:45 pm
Yes, I think in the meantime I realized I misunderstood the initial ask. :???: Sorry...
No problem. As I said, while it is not hard to know if the taskbar is set to auto-hide or not, I don't think there is any way to know if it is currently in a hidden or showing state at any given moment.

Windows doesn't see it as important that an application can know that, as what difference does it make? If the taskbar is set to always show, then applications should and will obey desktop work area. If it is set to auto-hide, then applications will use the entire screen, and won't care about the current state of the taksbar.
User avatar
balala
Rainmeter Sage
Posts: 7155
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Function for sensing taskbar state when in autohide

balala » November 5th, 2018, 7:53 pm

jsmorley wrote:
November 5th, 2018, 7:49 pm
No problem. As I said, while it is not hard to know if the taskbar is set to auto-hide or not, I don't think there is any way to know if it is currently in a hidden or showing state at any given moment.
Yep, probably...
User avatar
kyriakos876
Posts: 858
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Function for sensing taskbar state when in autohide

kyriakos876 » November 5th, 2018, 8:50 pm

Slim08 wrote:
November 5th, 2018, 5:53 pm
I toyed a bit around with your suggested code from https://forum.rainmeter.net/viewtopic.php?f=5&t=29574&p=153240&hilit=Registry#p153240 and I believe that we both think of something different when talking about a function for sensing taskbar state when in autohide. What I meant was a way to get a value in real time that represents whether or not the taskbar is hidden in that very moment. I believe what your code does is basically telling me if the setting "autohide" is turned on or not but not the actual real time state the taskbar is in at that moment.
oh yea... I thought you meant how to check if the autohide option is activated or not...
I have an idea, I will try it and post it later.
User avatar
kyriakos876
Posts: 858
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Function for sensing taskbar state when in autohide

kyriakos876 » November 5th, 2018, 10:51 pm

Okay, here's my solution:
TaskbarStatusDetector_6.11.2018.rmskin
This won't work when the mouse is over the "Start" button tho.
Let me know if it works. (I can't guarantee that this will be 100% reliable tho)
You do not have the required permissions to view the files attached to this post.
User avatar
Slim08
Posts: 22
Joined: October 8th, 2018, 4:38 pm

Re: Function for sensing taskbar state when in autohide

Slim08 » November 6th, 2018, 10:39 pm

I'm not familiar with the PixelColor plugin but my guess is that it is looking for #DefaultColorRGB# on the Y axis 20,21 and 22 px down from the top of the screen - sorry I don't get it. It absolutely doesn't work for me at all. For context - that is what my desktop looks like with autohide off windowed and maximized window.

Image
User avatar
kyriakos876
Posts: 858
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Function for sensing taskbar state when in autohide

kyriakos876 » November 7th, 2018, 6:58 am

Slim08 wrote:
November 6th, 2018, 10:39 pm
I'm not familiar with the PixelColor plugin but my guess is that it is looking for #DefaultColorRGB# on the Y axis 20,21 and 22 px down from the top of the screen - sorry I don't get it. It absolutely doesn't work for me at all. For context - that is what my desktop looks like with autohide off windowed and maximized window.

Image
Oh okay.... I thought you had a simple desktop... I suppose the 3 monitors and you are using translucent taskbar? Can't help you there ... I could do something similar if you have something pinned to your taskbar that you don't plan on changing the position of. For example if you have pinned the file explorer it could work but I would need a screenshot of your desktop with the file explorer, or whatever it is, showing. This obviously can't be used by someone else but if you won't it for yourself, be sure to send that screenshot if you have anything pinned there :)
(That doesn't look like window's taskbar... the start button's missing + the stuff on the right that displays the time, notifications etc.)
User avatar
Active Colors
Moderator
Posts: 498
Joined: February 16th, 2012, 3:32 am

Re: Function for sensing taskbar state when in autohide

Active Colors » November 7th, 2018, 9:35 am

Long time ago ~Faradey~ made an addon in AutoIt which shows taskbar's position, size, and if it has auto-hiding option. I have saved only compiled version. If you can decompile it or monitor what it reads you might get an idea how to find those things.
You do not have the required permissions to view the files attached to this post.
User avatar
kyriakos876
Posts: 858
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Function for sensing taskbar state when in autohide

kyriakos876 » November 7th, 2018, 9:39 am

Active Colors wrote:
November 7th, 2018, 9:35 am
Long time ago ~Faradey~ made an addon in AutoIt which shows taskbar's position, size, and if it has auto-hiding option. I have saved only compiled version. If you can decompile it or monitor what it reads you might get an idea how to find those things.
That's different from what the op wants... This probably reads and translates the registry value I mentioned above, which does not provide the information needed. Unless the size includes the current width and height whose height you can use to know if the taskbars currently hidden. (But I highly doubtful Windows shares this information)
User avatar
balala
Rainmeter Sage
Posts: 7155
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Function for sensing taskbar state when in autohide

balala » November 7th, 2018, 11:51 am

Active Colors wrote:
November 7th, 2018, 9:35 am
Long time ago ~Faradey~ made an addon in AutoIt which shows taskbar's position, size, and if it has auto-hiding option. I have saved only compiled version. If you can decompile it or monitor what it reads you might get an idea how to find those things.
That AutoIt addon probably shows, as you said, the position, size and if it has auto-hiding option, but not if the auto-hidden taskbar is up or down.
In fact, I'd say that what Slim08 asked initially is probably not possible: https://forum.rainmeter.net/viewtopic.php?f=4&t=30007#p154684