MSFN Forum: Quick Launch vbs Toggler - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Quick Launch vbs Toggler no more nasty registry imports Rate Topic: -----

#1 User is offline   x0rcist 

  • Group: Members
  • Posts: 3
  • Joined: 13-January 06

Posted 03 March 2006 - 03:28 AM

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.


#2 User is offline   Methanoid 

  • Junior
  • Pip
  • Group: Members
  • Posts: 88
  • Joined: 21-December 04
  • OS:none specified

Posted 16 May 2006 - 02:29 AM

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?

#3 User is offline   oioldman 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 967
  • Joined: 16-April 04
  • OS:Windows 7 x64

Posted 16 May 2006 - 03:44 AM

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

#4 User is offline   Methanoid 

  • Junior
  • Pip
  • Group: Members
  • Posts: 88
  • Joined: 21-December 04
  • OS:none specified

Posted 18 May 2006 - 06:03 AM

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?

#5 User is offline   Hoppel 

  • Group: Members
  • Posts: 1
  • Joined: 21-June 06

Posted 21 June 2006 - 03:23 AM

View PostMethanoid, on May 18 2006, 02:03 PM, said:

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?

This post has been edited by Hoppel: 21 June 2006 - 03:57 AM


#6 User is offline   IcemanND 

  • MSFN Junkie
  • Group: Super Moderator
  • Posts: 3,239
  • Joined: 24-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 21 June 2006 - 07:00 AM

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


#7 User is offline   cmc 

  • Group: Members
  • Posts: 1
  • Joined: 13-August 09

Posted 13 August 2009 - 07:09 PM

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":

Quote

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 :)

#8 User is offline   lisapstone 

  • Group: Members
  • Posts: 2
  • Joined: 29-April 10
  • OS:none specified
  • Country: Country Flag

Posted 30 April 2010 - 01:02 PM

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!!





View Postx0rcist, on 03 March 2006 - 03:28 AM, said:

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.


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy