Help - Search - Members - Calendar
Full Version: Quick Launch windows 7 script
MSFN Forums > Microsoft Software Products - Discussion & Support > Windows 7

   


Google Internet Forums Unattended CD/DVD Guide
wazer
Hello fellas acalcutt and i have tryed to acomplish an automatic script for making quick launch classic in windows 7.

Tho theres still some fine tuning to do. And thats why im asking here now.

We urgent need your help to make it perfect. Please test it and come with input with codes to make it even better, if you have any.

The script reports 1 error

QUOTE
AutoIt Error
Line -1:
Error: Subscript used with non-Aray variable


Now how do we fix this any help would be appreciated feel free to use the code smile.gif.

Source = autoit code.
CODE
;------------------------------------------------------------------
; AutoIt Version: 3.3.0.0
; Author: Andrew Calcutt, wazer
; Last Edited: 09/12/2009
; Script Function: Adds Quick Launch Toolbar
;------------------------------------------------------------------
;Unlock Taskbar
_ToggleTaskbarLock()
;Create Quicklaunch Toolbar
_TaskToolbarWin7("Shell:Quick Launch")
;Get Quick Launch current postion
While 1
    Sleep(100)
    $QUICKLAUNCH = ControlGetPos("[CLASS:Shell_TrayWnd]", "", "[CLASS:ToolbarWindow32; TEXT:Quick Launch]")
    If Not @error Then ExitLoop
WEnd
$TaskBar_CenterHeight = @DesktopHeight - ($QUICKLAUNCH[3] / 2)
;Hide "Quick Launch" toolbar text
MouseClick("right", $QUICKLAUNCH[0] - 5, $TaskBar_CenterHeight, 1, 0)
Send("{DOWN}{DOWN}{DOWN}{ENTER}")
;Hide "Quick Launch" toolbar  title
MouseClick("right", $QUICKLAUNCH[0] - 5, $TaskBar_CenterHeight, 1, 0)
Send("{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}")
;Move "Quick Launch" toolbar
$QUICKLAUNCH = ControlGetPos("[CLASS:Shell_TrayWnd]", "", "[CLASS:ToolbarWindow32; TEXT:Quick Launch]")
$TRAY = ControlGetPos("[CLASS:Shell_TrayWnd]", "", "[CLASS:ReBarWindow32]")
MouseClickDrag("left", $QUICKLAUNCH[0] - 5, $TaskBar_CenterHeight, $TRAY[0] + 5, $TaskBar_CenterHeight, 0)
;Move "Current Apps" bar
$CURRENTAPPS = ControlGetPos("[CLASS:Shell_TrayWnd]", "", "[CLASS:MSTaskListWClass; TEXT:Running applications]")
MouseClickDrag("left", $CURRENTAPPS[0] - 5, $TaskBar_CenterHeight, $TRAY[0] + 105, $TaskBar_CenterHeight, 0)
;Lock Taskbar
_ToggleTaskbarLock()

Func _TaskToolbarWin7($toolbardir)
    MouseClick("right", 0, @DesktopHeight)
    Send("{DOWN}{RIGHT}{UP}{ENTER}")
    WinWaitActive("New Toolbar")
    ControlSetText("New Toolbar", "", "Edit1", $toolbardir)
    ControlClick("New Toolbar", "", "Button1")
EndFunc  ;==>_TaskToolbarWin7

Func _ToggleTaskbarLock()
    MouseClick("right", 0, @DesktopHeight)
    Send("{UP}{UP}{ENTER}")
EndFunc  ;==>_ToggleTaskbarLock
MAVERICKS CHOICE
Maybe ask Mhz if he hasn't already look @ this thread.
Cee-Kay
QUOTE
AutoIt Error
Line -1:
Error: Subscript used with non-Aray variable
You've already done the hard work, you simply need to compile the code; the script works fine smile.gif

Personally, the only change I would make is to change the view to 'Large Icons' (when the taskbar is unlocked).

Good job Wazer thumbup.gif
sp00f
Only works on English version?
Didnt work on Dutch Windows 7.

Did you also looked here : [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
And here : [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]

(It covers a few things.)
wazer
QUOTE (sp00f @ Oct 9 2009, 07:01 AM) *
Only works on English version?
Didnt work on Dutch Windows 7.

Did you also looked here : [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
And here : [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]

(It covers a few things.)



Thats because you have check what new toolbar is spelled in dutch. I dont know sorry, and you have to check the hotkeys also i have marked with bold in the code below, try to see if you can find the results with your keyboard(Rightclick on toolbar and use keyboard to find the hotkeys for dutch). i only got for danish and english sorry.

The regs dont work in windows 7, trust me i have tried everything mate :=)


QUOTE
AutoIt Version: 3.3.0.0
; Author: Andrew Calcutt, wazer
; Last Edited: 09/12/2009
; Script Function: Adds Quick Launch Toolbar
;------------------------------------------------------------------
;Unlock Taskbar
_ToggleTaskbarLock()
;Create Quicklaunch Toolbar
_TaskToolbarWin7("Shell:Quick Launch")
;Get Quick Launch current postion
While 1
Sleep(100)
$QUICKLAUNCH = ControlGetPos("[CLASS:Shell_TrayWnd]", "", "[CLASS:ToolbarWindow32; TEXT:Quick Launch]")
If Not @error Then ExitLoop
WEnd
$TaskBar_CenterHeight = @DesktopHeight - ($QUICKLAUNCH[3] / 2)
;Hide "Quick Launch" toolbar text
MouseClick("right", $QUICKLAUNCH[0] - 5, $TaskBar_CenterHeight, 1, 0)
Send("{DOWN}{DOWN}{DOWN}{ENTER}")
;Hide "Quick Launch" toolbar title
MouseClick("right", $QUICKLAUNCH[0] - 5, $TaskBar_CenterHeight, 1, 0)
Send("{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}")
;Move "Quick Launch" toolbar
$QUICKLAUNCH = ControlGetPos("[CLASS:Shell_TrayWnd]", "", "[CLASS:ToolbarWindow32; TEXT:Quick Launch]")
$TRAY = ControlGetPos("[CLASS:Shell_TrayWnd]", "", "[CLASS:ReBarWindow32]")
MouseClickDrag("left", $QUICKLAUNCH[0] - 5, $TaskBar_CenterHeight, $TRAY[0] + 5, $TaskBar_CenterHeight, 0)
;Move "Current Apps" bar
$CURRENTAPPS = ControlGetPos("[CLASS:Shell_TrayWnd]", "", "[CLASS:MSTaskListWClass; TEXT:Running applications]")
MouseClickDrag("left", $CURRENTAPPS[0] - 5, $TaskBar_CenterHeight, $TRAY[0] + 105, $TaskBar_CenterHeight, 0)
;Lock Taskbar
_ToggleTaskbarLock()

Func _TaskToolbarWin7($toolbardir)
MouseClick("right", 0, @DesktopHeight)
Send("{DOWN}{RIGHT}{UP}{ENTER}")
WinWaitActive("New Toolbar")
ControlSetText("New Toolbar", "", "Edit1", $toolbardir)
ControlClick("New Toolbar", "", "Button1")
EndFunc ;==>_TaskToolbarWin7

Func _ToggleTaskbarLock()
MouseClick("right", 0, @DesktopHeight)
Send("{UP}{UP}{ENTER}")
EndFunc ;==>_ToggleTaskbarLock







QUOTE (MAVERICKS CHOICE @ Sep 30 2009, 12:29 AM) *
Maybe ask Mhz if he hasn't already look @ this thread.


Has he done something simliar that may be better, i would like to know smile.gif



QUOTE (Cee-Kay @ Oct 7 2009, 04:07 PM) *
QUOTE
AutoIt Error
Line -1:
Error: Subscript used with non-Aray variable
You've already done the hard work, you simply need to compile the code; the script works fine smile.gif

Personally, the only change I would make is to change the view to 'Large Icons' (when the taskbar is unlocked).

Good job Wazer thumbup.gif


Thanks, thats why its open so everybody can do they own little personal needs smile.gif


DonDamm
This could be very handy. I've been fighting with a basic installation of W7 and noticed the Quick Launch Bar seems to disappear every few boots. What a pain! It may have something to do with the automatic alphabetizing and reordering that goes on. Any idea on how to turn that off as well? I ended up numbering each item so the order would stay. A kluge at best.




Google Internet Forums Unattended CD/DVD Guide

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.