Win7 One-click Drag to generate the Quick Launch bar

Source: Internet
Author: User

One-click Drag to build the Quick Launch toolbar

^#x::; Automatically add Quick Launch toolbarifhad_added () Exitapp ql_add () Sleep, $  if(is_locked ()) {Lock_unlock ()} Sleep, $Clear () Sleep, $Control_move () control_set () Sleep, $Lock_unlock () Blockinput,off;=====================================================Ql_add () {winactivate,ahk_class Shell_traywnd wingetpos, X, Y, W, H, Ahk_class Shell_traywnd Co Ntrolclick,%"x" 0 "y"h, Ahk_class Shell_traywnd,, R blockinput,on while(!menu1_hwnd: =Waitmenu (click_x, click_y)) Sleep, $controlsend, ahk_parent, T, ahk_id%menu1_hwnd%Controlsend, Ahk_parent, {right}, ahk_id%menu1_hwnd%Wingetpos, m1x, m1y, m1w, m1h, ahk_id%menu1_hwnd% while(!menu2_hwnd: = Waitmenu (m1x+m1w, m1y, Menu1_hwnd)) Sleep, $controlsend, Ahk_parent,n, ahk_id%menu2_hwnd%winwait, new toolbar-Select Folder Controlclick, Edit1, new toolbar-Select folder, L controlsettext, Edit1,%appdata%\microsoft\internet Explorer\Quick Launch, new tool bar-Select Folder Controlsend, Edit1, {Enter}, new toolbar-Select Folder Controlclick, Button1, new toolbar-Select folder Controlgetpos,xs,ys,,, Button1, new toolbar-Select Folder Loop {ifwinexist, new toolbar-Select folder {winactivate, new toolbar-Select Folder Mousemove,xs+5, ys+5,0Send {Lbutton}}Else          {               Break} Sleep, $}} is_locked () {regread, Status, HKCU, Software\microsoft\windows\currentversion\explorer\advanc Ed, Taskbarsizemove.return!Status} lock_unlock () {wingetpos, X, Y, W, H, Ahk_class Shell_traywnd Controlclick,%"x"X"y"y+h, Ahk_class Shell_traywnd,, R while(! Menu_hwnd: =Waitmenu (click_x, click_y)) Sleep, $controlsend, Ahk_parent, L, ahk_id%menu_hwnd%} clear () {winget, ctr_list, Controllist, Ahk_class Shell_traywnd Loop, Parse, Ctr_list, ' N, ' r { ifINSTR (A_loopfield,"ToolbarWindow32") {controlgettext, TXT,%A_loopfield, Ahk_class shell_traywndif(txt="Quick Launch") {ql_ctr:=A_loopfield Break              }          }      }      ifql_ctr {controlget, Ql_ctr_hwnd, hwnd,,%ql_ctr, Ahk_class shell_traywnd wingetpos, X, Y, W, H, ahk_id%ql_ctr_hwnd%Controlclick,%"x" 0 "y"H, ahk_id%ql_ctr_hwnd%,, R while(! Menu1_hwnd: = Waitmenu (x, y+h)) Sleep, $Controlsend, Ahk_parent, V, ahk_id%menu1_hwnd%Controlsend, Ahk_parent, {right}, ahk_id%menu1_hwnd%Wingetpos, m1x, m1y, m1w, m1h, ahk_id%menu1_hwnd% while(! Menu2_hwnd: = Waitmenu (m1x+m1w, m1y, Menu1_hwnd)) Sleep, $Controlsend, Ahk_parent, G, ahk_id%menu2_hwnd%Winwaitclose, ahk_id%menu2_hwnd%Wingetpos, X, Y, W, H, ahk_id%ql_ctr_hwnd%Controlclick,%"x" 0 "y"H, ahk_id%ql_ctr_hwnd%,, R while(! Menu3_hwnd: = Waitmenu (x, y+h)) Sleep, $controlsend, Ahk_parent, X, ahk_id%menu3_hwnd%Winwaitclose, ahk_id%menu3_hwnd%Wingetpos, X, Y, W, H, ahk_id%ql_ctr_hwnd%Controlclick,%"x" 0 "y"H, ahk_id%ql_ctr_hwnd%,, R while(! Menu4_hwnd: = Waitmenu (x, y+h)) Sleep, $Controlsend, Ahk_parent, W, ahk_id%menu4_hwnd%Winwaitclose, ahk_id%menu4_hwnd%}} control_move () {Loop,5{controlgetpos,x2,y2,,, mstasklistwclass1,ahk_class shell_traywnd controlgetpos,x,y,,, ToolbarW Indow323,ahk_class Shell_traywndif(x>x2) {Winactivate,ahk_class Shell_traywnd mousemove,x-5, y+5,0Send {Lbutton} Sleep, -MouseMove,0, y+5,8Send {Lbutton up}}Else  {   Break}}} control_set () {blockinput,on Winactivate,ahk_class shell_traywnd controlgetpos,x,y,w , H,toolbarwindow323,ahk_class shell_traywnd controlgetpos,x2,y2,,, mstasklistwclass1,ahk_class Shell_TrayWnd Mous Emove,x+w+ (X2-X-W) *2/3, h/2,0Send {Lbutton} Sleep, $controlgetpos,,, w0,h,toolbarwindow323,ahk_class shell_traywnd WC:=w0/2MouseMove,-WC,0,5, R con:=0Loop {if(wc<1)      {           Break} WC:=wc/2controlgetpos,,, W,h,toolbarwindow323,ahk_class shell_traywndif((w0-wc*2&GT;W) and (con=0) ) {con:=1    }  Else if((w0-wc*2=W) and (con=0) ) {con:=0  }  Else if((w0+wc*2&LT;W) and (con=1) ) {con:=0    }  Else if((w0-wc*2=W) and (con=1) ) {con:=1  }    if(con=0) {w0:=W MouseMove,-WC,0,5, R}Else{w0:=W MOUSEMOVE,WC,0,5, R}} Send {Lbutton up} Blockinput,off} had_added () {winget, ctr_list, Controllist, Ahk_class Shell_traywnd Loop , Parse, Ctr_list, ' N, ' r {ifINSTR (A_loopfield,"ToolbarWindow32") {controlgettext, TXT,%A_loopfield, Ahk_class shell_traywndif(txt="Quick Launch") {ql_ctr:=A_loopfield Break              }          }      }      ifql_ctrreturn 1} waitmenu (click_x, click_y, Ex_hwnd:="") {winget, WINS, List a:=""Loop%wins {win:= wins%a_index%Wingetpos, X, Y, W, H, ahk_id%win%Wingettitle, title, ahk_id%win%if(!title && (Abs (click_y-y) <8|| Abs (click_y-(y+h)) <8) && w< -&& w> the&& h> -&& (Ex_hwnd Win<>ex_hwnd:1))  {              returnwin}} }  

Win7 One-click Drag to generate the Quick Launch bar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.