mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2006
Posts: 27
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: May 2006
Posts: 27
The prop sbstate and tbstate for windows return wrong result when the switchbar or treebar is hidden...

ex.: //swtichbar off | window @a | echo -ga $window(@a).sbstate
return 0, switchbar is hidden not the window... so, this is not be to return 1?

sorry for my english, i don't speek very well laugh


Suchorski @ FreeNode
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
sbstate shows that the switchbar button for that window is visible. If the switchbar is off, the button is obviously hidden (0).

tbstate does the same thing for the treebar buttons.

This is likely meant to work with the /window -w[n] @window command.

-genius_at_work

Joined: May 2006
Posts: 27
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: May 2006
Posts: 27
yeah... but i made my personal script with pw and my switchbar is pw too so how my script can know if the window was openned with -w[N]?

tks


Suchorski @ FreeNode
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
You'll have to code that logic yourself then. Likely, you can no longer use /window -wN to create your custom windows using your setup.

The switchbar behaviour is not a bug-- it returns whether the button in the switchbar is visible or not-- to you.. not to the switchbar. When the switchbar is hidden, can you see the button? If not, then the result is accurate.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: May 2006
Posts: 27
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: May 2006
Posts: 27
ok, but in the help says

sbstate returns switchbar button state for a window
tbstate returns treebar button state for a window

its not saying that is visible to me... its saying visible to switchbar or treebar, no?



Suchorski @ FreeNode
Joined: Dec 2002
Posts: 5,412
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,412
These properties take into account whether the bar is visible or not - so they do in fact indicate whether the button is visible to you. This is how I originally coded the routine. However I can change it so that they indicate whether the button is visible in the bar, even if the bar is hidden, so that scripts can set/get these settings reliably. Unless anyone sees an issue with that, I'll make this change for the next version.


Link Copied to Clipboard