Jump to content

Quick Launch vbs Toggler


Recommended Posts

Hi All,

After many different approaches to enable the quick launch toolbar i finally found a way that works without the use of nasty registry imports.

I Wrote a little vbs code to get this thing done and it can be lauched from the post setup (ex. runonce).

You can try it yourself by cutting and pasting the code below into a textfile and call it like quicklaunch.vbs or something like that.

set WshShell = WScript.CreateObject("WScript.Shell")	

WshShell.SendKeys("^{ESC}")
WScript.Sleep 100
WshShell.SendKeys("{TAB}")
WScript.Sleep 100
WshShell.SendKeys("%~")
WScript.Sleep 100
WshShell.SendKeys("{TAB}{TAB}{TAB}{TAB}")
WshShell.SendKeys(" ")
WshShell.SendKeys("{TAB}{TAB}{TAB}")
WshShell.SendKeys("~")

Hope this helps some people with the automatic toggling of the quicklaunch.

Link to comment
Share on other sites

  • 2 months later...

Does this method also Unlock the toolbars as otherwise you wont get to see your Quicklaunch icons. Is there anyway to automatically resize the toolbars or even specify the size to enable Quicklaunch to be fully seen?

Link to comment
Share on other sites

you will get to see your icons whether it is locked or not, if locked it stops at showing 3, and then you need to select the double right arrow to view others and same if unlocked - so you get to see icons either way around

Link to comment
Share on other sites

No, the taskbar/toolbar remains locked so unless you UNLOCK it you cannot resize the Quicklaunch bar to see ALL your icons. Anyone any good at VBS (I'm not) could fix the script to also unlock the toolbar?

Link to comment
Share on other sites

  • 1 month later...
No, the taskbar/toolbar remains locked so unless you UNLOCK it you cannot resize the Quicklaunch bar to see ALL your icons. Anyone any good at VBS (I'm not) could fix the script to also unlock the toolbar?

In the above script the spacebar is used to toggle the quick launch bar on/off. Try sending a minus (-) or a plus (+) key instead of the space bar and it does not just switch from on to off or off to on, but you can make sure that the option is selected or deselected. If you adjust the script a bit, like this, then the quick launch bar is also unlocked.

set WshShell = WScript.CreateObject("WScript.Shell")	

WshShell.SendKeys("^{ESC}")
WScript.Sleep 100
WshShell.SendKeys("{TAB}")
WScript.Sleep 100
WshShell.SendKeys("%~")
WScript.Sleep 100
WshShell.SendKeys("-")
WshShell.SendKeys("{TAB}")
WshShell.SendKeys("-")
WshShell.SendKeys("{TAB}")
WshShell.SendKeys("-")
WshShell.SendKeys("{TAB}")
WshShell.SendKeys("-")
WshShell.SendKeys("{TAB}")
WshShell.SendKeys("+")
WshShell.SendKeys("{TAB}")
WshShell.SendKeys("+")
WshShell.SendKeys("{TAB}{TAB}")
WshShell.SendKeys("-")
WshShell.SendKeys("~")

:)

Edit: seems like this does not always work here :no: Sometimes it does, sometimes it don't... anyone knows another solution?

Edited by Hoppel
Link to comment
Share on other sites

How about this:

dim oShell
Dim oAppl
Set oAppl = createObject("shell.application")
Set oShell = CreateObject("wscript.shell")
oAppl.trayproperties
WScript.Sleep(2000)
oShell.SendKeys"%{q}" 'Toggles Show quick launch
oShell.Sendkeys"%{l}" 'Toggles Lock the taskbar
oShell.SendKeys"{ENTER}"
Set oShell=Nothing
Set oAppl=Nothing

Link to comment
Share on other sites

  • 3 years later...

Follow-up to the post from Hoppel, just noticed an item that might warrant a second look. In the example script a plus sign was used to enable the "Show Quick Launch". After some quick testing and research from Microsoft's MSDN site, I noticed that the keys to send to enable the option would actually be "+=", not "+". The resultant code from xOrcist's example would look something like this:

set WshShell = WScript.CreateObject("WScript.Shell") 

WshShell.SendKeys("^{ESC}")
WScript.Sleep 100
WshShell.SendKeys("{TAB}")
WScript.Sleep 100
WshShell.SendKeys("%~")
WScript.Sleep 100
WshShell.SendKeys("{TAB}{TAB}{TAB}{TAB}")
WshShell.SendKeys("+=") ' or WshShell.SendKeys("-")
WshShell.SendKeys("{TAB}{TAB}{TAB}")
WshShell.SendKeys("~")

It does work with the right keys, including the minus sign to disable, even if the sleep time is lowered to 5 milliseconds.

A possibly neater solution might be that posted by certit in another thread "Show Quick Launch":

To enable the quick launch or to resize it can easily be done using the SOETool from soetool.net.

It uses only API's and works on all systems.

Just register the DLL and then its two lines of code in VBScript

Set oTaskbar = CreateObject("soetool.Taskbar")

oTaskbar.QuickLaunch = True

-cmc :)

Link to comment
Share on other sites

  • 8 months later...

Do you have something that will just enlarge it to accommodate more icons. I want it locked for users, but i want to display 6 icons instead of the default three.

Thanks!!

Hi All,

After many different approaches to enable the quick launch toolbar i finally found a way that works without the use of nasty registry imports.

I Wrote a little vbs code to get this thing done and it can be lauched from the post setup (ex. runonce).

You can try it yourself by cutting and pasting the code below into a textfile and call it like quicklaunch.vbs or something like that.

set WshShell = WScript.CreateObject("WScript.Shell")	

WshShell.SendKeys("^{ESC}")
WScript.Sleep 100
WshShell.SendKeys("{TAB}")
WScript.Sleep 100
WshShell.SendKeys("%~")
WScript.Sleep 100
WshShell.SendKeys("{TAB}{TAB}{TAB}{TAB}")
WshShell.SendKeys(" ")
WshShell.SendKeys("{TAB}{TAB}{TAB}")
WshShell.SendKeys("~")

Hope this helps some people with the automatic toggling of the quicklaunch.

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...