elppacore

Member
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About elppacore

  1. thank you code ;------------------------------------------------------------------ ; AutoIt Version: 3.3.0.0 ; Author: Andrew Calcutt, wazer ; Last Edited: 09/12/2009 ; Script Function: Adds Quick Launch Toolbar ;------------------------------------------------------------------ $answer = MsgBox(4, "Adds Quick Launch Toolbar?") ; if MsgBox answer 「NO」back 7 If $answer = 7 Then MsgBox(0, "AutoIt", "yes,Bye!") Exit EndIf ;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 MouseClick("right", 0, @DesktopHeight) Send("{UP}{UP}{ENTER}") MsgBox(0, "AutoIt", "Adds Quick Launch Toolbar done!") 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() $value = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarSizeMove") If $value = 0 Then MouseClick("right", 0, @DesktopHeight) Send("{UP}{UP}{ENTER}") EndIf EndFunc;==>_ToggleTaskbarLock chinese ver ;------------------------------------------------------------------ ; AutoIt Version: 3.3.0.0 ; Author: Andrew Calcutt, wazer ; Last Edited: 09/12/2009 ; Script Function: Adds Quick Launch Toolbar ;------------------------------------------------------------------ $answer = MsgBox(4, "自動建立快速啟動工具列", "此程式會建立Windows7的快速啟動後離開,要執行嗎?") ; 若在 MsgBox 中選「NO」會傳回 7 If $answer = 7 Then MsgBox(0, "AutoIt", "好的,Bye!") Exit EndIf ;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:執行中的應用程式]") MouseClickDrag("left", $CURRENTAPPS[0] - 5, $TaskBar_CenterHeight, $TRAY[0] + 105, $TaskBar_CenterHeight, 0) ;Lock Taskbar MouseClick("right", 0, @DesktopHeight) Send("{UP}{UP}{ENTER}") MsgBox(0, "AutoIt", "快速啟動工具列建立完成!") Func _TaskToolbarWin7($toolbardir) MouseClick("right", 0, @DesktopHeight) Send("{DOWN}{RIGHT}{UP}{ENTER}") WinWaitActive("新增工具列") ControlSetText("新增工具列", "", "Edit1", $toolbardir) ControlClick("新增工具列", "", "Button1") EndFunc;==>_TaskToolbarWin7 Func _ToggleTaskbarLock() $value = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarSizeMove") If $value = 0 Then MouseClick("right", 0, @DesktopHeight) Send("{UP}{UP}{ENTER}") EndIf EndFunc;==>_ToggleTaskbarLock