mIRC Homepage
Posted By: WideOpenSpace treebar cmd - 08/08/07 12:26 AM
is there command that enables/disables treebar and switchbar ?
Posted By: SladeKraven Re: treebar cmd - 08/08/07 01:06 PM
I don't think there is.
Posted By: hixxy Re: treebar cmd - 08/08/07 05:55 PM
You can simulate a keystroke using COM objects, but you'll have to open up the mIRC menus to do that, so on slow computers there might be a slight flicker. Seems fine on mine though.

Code:
alias sendkeys {
  var %object = sendkeys $+ $ticks
  .comopen %object WScript.Shell
  if ($com(%object)) { .comclose %object $com(%object,SendKeys,3,bstr,$1-) }
}
alias toggletreebar { sendkeys % $+ vr }
alias toggletoolbar { sendkeys % $+ vt }


/toggletoolbar
/toggletreebar
Posted By: SladeKraven Re: treebar cmd - 08/08/07 06:00 PM
An addition to hixxy's nice little work around for toggling treebar/toolbar here's one for the switchbar as you mentioned:

Code:
alias toggleswitchbar { sendkeys % $+ vs }


/toggletreebar
Posted By: WideOpenSpace Re: treebar cmd - 08/08/07 06:42 PM
i respect your effort hixxy (always did :P)
but that code only opens view menu for me
and i wanted to know if theres way for directly
enableing/disableing treebar

like you did for menu, but so it just shows/hides :P

?

---

@SladeKraven: your alias works ok (shows/hides switchbar)
--

is it because i use 6.20 the trrebar thing by hixxy dont work ?
Posted By: hixxy Re: treebar cmd - 08/08/07 06:45 PM
I believe in 6.2 there was a problem where the treebar and toolbar had the same accelerator key, so you might wish to try:

Code:
alias toggletoolbar { sendkeys % $+ vt{ENTER} }
alias toggletreebar { sendkeys % $+ vtt{ENTER} }
Posted By: WideOpenSpace Re: treebar cmd - 08/08/07 06:50 PM
now i know why it dont work...

2 T shortcuts are in same menu...

Posted By: WideOpenSpace Re: treebar cmd - 08/08/07 06:53 PM
Code:
alias toggletreebar { sendkeys % $+ vtt{ENTER} }


this still not working smirk
Posted By: WideOpenSpace Re: treebar cmd - 08/08/07 07:58 PM
my apoligoies hixxy.
it works smile

kinda weird behaviour of mirc...

for toolbar i just renamed alias to "tbar"
and for treebar "ttbar" and on /ttbar it didnt work
but when i rename it to anything else it works...
---

many thanks hixxy !

edit:
just a lil question, will this work on any win version ?
Posted By: hixxy Re: treebar cmd - 08/08/07 09:56 PM
It should work on anything that has the windows script host installed, which most computers come with these days. Some antiviruses disable it but I find that COM scripts work for the majority of people.
Posted By: WideOpenSpace Re: treebar cmd - 09/08/07 05:17 PM
have any idea would it work with winME and win2k ?
Posted By: hixxy Re: treebar cmd - 09/08/07 08:21 PM
If it has the windows script host installed, yes.
Posted By: WideOpenSpace Re: treebar cmd - 15/08/07 04:55 PM
btw, is there a way (mirc) or non mirc(hixxy ways)
to detect if treebar OR switchbar is already used by mirc
(at present moment)

?
Posted By: Wims Re: treebar cmd - 15/08/07 06:12 PM
Dcx.dll can do that smile
Posted By: WideOpenSpace Re: treebar cmd - 15/08/07 06:14 PM
that was terrible answer...
Posted By: genius_at_work Re: treebar cmd - 16/08/07 12:24 AM
It looked like a pretty accurate answer to me. You asked if something could be done, and Wims informed you that you can. In fact, he even gave you additional information (that you didn't request) by telling you what can be used to accomplish your task.

-genius_at_work
Posted By: WideOpenSpace Re: treebar cmd - 16/08/07 12:39 AM
but dcx is for changing gui ...
Posted By: Wims Re: treebar cmd - 16/08/07 01:41 AM
Not exactly, it appear that some people believed this but dcx.dll include some other thing like docking, and it's this feature that allow you to know if menu/switch/tree/toolbar are visible or not :

$xdock(mIRC).isMenuBar
$xdock(mIRC).isSwitchBar
$xdock(mIRC).isTreeBar
$xdock(mIRC).isToolBar

see this page for more help : http://dcx.scriptsdb.org/xdock.htm

smile
Posted By: Riamus2 Re: treebar cmd - 16/08/07 02:02 AM
Yes, DCX is a great DLL for doing a lot of different things that cannot be done with mIRC scripting (or not as easily).
Posted By: Wims Re: treebar cmd - 16/08/07 02:18 AM
I agree completely, it's the single one dll that is really useful for mirc itself (other dll a great too, but generally doing only one thing that is specific to something else of mirc).
Another dll that doing great thing for mirc too is cwnd.dll (use API message) but help is only in french.
© mIRC Discussion Forums