win7一键拖动生成快速启动栏
一键拖动生成快速启动工具栏
^#x:: ;自动添加快速启动工具栏
if had_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
ControlClick, % "x" " 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, 新工具栏 - 选择文件夹
ControlClick, Edit1, 新工具栏 - 选择文件夹,, L
ControlSetText, Edit1, %APPDATA%\Microsoft\Internet Explorer\Quick Launch, 新工具栏 - 选择文件夹
ControlSend, Edit1, {Enter}, 新工具栏 - 选择文件夹
ControlClick, Button1, 新工具栏 - 选择文件夹
ControlGetPos,xs,ys,,,Button1,新工具栏 - 选择文件夹 Loop
{ IfWinExist, 新工具栏 - 选择文件夹
{
WinActivate,新工具栏 - 选择文件夹
MouseMove,xs+,ys+,
Send {LButton}
}
else
{
break
}
Sleep,
}
} is_locked()
{
RegRead, Status, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, 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
{
if InStr(A_LoopField,"ToolbarWindow32")
{
ControlGetText, txt, % A_LoopField, ahk_class Shell_TrayWnd
if (txt="Quick Launch")
{
ql_ctr := A_LoopField
break
}
}
}
if ql_ctr
{
ControlGet, ql_ctr_hwnd, Hwnd, , % ql_ctr, ahk_class Shell_TrayWnd
WinGetPos, x, y, w, h, ahk_id %ql_ctr_hwnd%
ControlClick, % "x" " 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" " 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" " 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,
{
ControlGetPos,x2,y2,,,MSTaskListWClass1,ahk_class Shell_TrayWnd
ControlGetPos,x,y,,,ToolbarWindow323,ahk_class Shell_TrayWnd
if (x>x2)
{
WinActivate,ahk_class Shell_TrayWnd
MouseMove,x-,y+,
Send {LButton down}
Sleep,
MouseMove,,y+,
Send {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
MouseMove,x+w+(x2-x-w)*/,h/,
Send {LButton down}
Sleep,
ControlGetPos,,,w0,h,ToolbarWindow323,ahk_class Shell_TrayWnd
wc:=w0/
mousemove,-wc,,,r
con:=
loop
{
if (wc<)
{
break
}
wc:=wc/
ControlGetPos,,,w,h,ToolbarWindow323,ahk_class Shell_TrayWnd
if ((w0-wc*>w)and(con=))
{
con:= }
else if ((w0-wc*=w)and(con=))
{
con:=
}
else if ((w0+wc*<w)and(con=))
{
con:= }
else if ((w0-wc*=w)and(con=))
{
con:=
} if (con=)
{
w0:=w
mousemove,-wc,,,r
}
else
{
w0:=w
mousemove,wc,,,r
} }
Send {LButton up}
blockinput,off
} had_added(){
WinGet, ctr_list, ControlList, ahk_class Shell_TrayWnd
Loop, Parse, ctr_list, `n, `r
{
if InStr(A_LoopField,"ToolbarWindow32")
{
ControlGetText, txt, % A_LoopField, ahk_class Shell_TrayWnd
if (txt="Quick Launch")
{
ql_ctr := A_LoopField
break
}
}
}
if ql_ctr
return
} 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)< || Abs(Click_y-(y+h))<) && w< && w> && h> && (ex_hwnd ? win<>ex_hwnd : ))
{
return win
}
}
}
win7一键拖动生成快速启动栏的更多相关文章
- win7 系统如何设置快速启动栏
a.在任务栏上右键 -> 工具栏 -> 新建工具栏 -> 跳出选择文件夹对话框,在文件夹里面(光标山洞处)输入这个路径,然后按回车: %userprofile%\AppData\Ro ...
- win7 下恢复“经典任务栏”/“快速启动栏”,关闭“窗口自动最大化” -摘自网络
1.自动放大窗口 鼠标把窗口拖到屏幕边缘时,win7会自做聪明的把窗口放大,有时候这个很烦人. 解决办法: 运行“REGEDIT”打开注册表,找到 “HKEY_CURRENT_USER\Control ...
- Win7快速启动栏
http://jingyan.baidu.com/article/456c463bbc1d140a583144cf.html 1. 在任务栏上右键 -> 工具栏 -> 新建工具栏. 在 ...
- win7和win8如何设置快速启动栏
a.在任务栏上右键 -> 工具栏 -> 新建工具栏 -> 跳出选择文件夹对话框,在文件夹里面(光标山洞处)输入这个路径,然后按回车: %userprofile%\AppData\Ro ...
- 如何用INNO安装添加快捷启动方式到Win7的快速启动栏(超级任务栏)
问题:如何用INNO安装添加快捷启动方式到Win7的快速启动栏(超级任务栏) 在XP下,添加方式是直接把快捷方式复制到%appdata%\Microsoft\Internet Explorer\Qui ...
- Delphi -- 创建 桌面、发送到...、快速启动栏、开始菜单、程序菜单、右键菜 单
{================================================================= 功 能: 创建 桌面.发送到....快速启动栏.开始菜单.程序菜单 ...
- vc++ windows 快速启动栏创建快捷方式
创建快速启动栏 在windows软件开发中,软件安装过程中总是需要在快速启动栏创建快捷方式,下面介绍一种快速启动栏创建快捷方式的方法,具体代码如下:(该方法不支持win10,目前还没有找到win10的 ...
- 根据权限显示隐藏SharePoint 2010快速启动栏的链接
转:http://www.360sps.com/Item/ShowAndHiddenLink.aspx 在SharePoint 2010的快速启动栏中可以根据权限来显示或隐藏列表.库.网站的链接,如果 ...
- 自定义 SharePoint 2010 快速启动栏和顶部链接栏
转:http://vickynuli.blog.163.com/blog/static/180438492201281434249486/ 在网上找到篇文章,自定义快速启动栏和顶部链接栏,以下为代码, ...
随机推荐
- PatePoco中对sql参数化时Top参数化的问题
PatePoco中对sql参数化是直接用@+参数名来处理,但是想用如下语句时竟然报错了 SELECT TOP @num * FROM tableA 执行时抛出异常,根据错误提示搞了很久都没找到原因,最 ...
- Mysql/Mariadb 升级注意事项
因需要使用到分区表,在业务不中断的情况下,可以新增分区,需要将原来的Mariadb10.1.25版本升级到Mariadb10.3.8. 1.升级步骤如下 1)新搭建Mariadb10.3.8版本的DB ...
- JavaScript 自定义文本框光标——初级版
文本框(input或textarea)的光标无法修改样式(除了通过color修改光标颜色).但笔者希望个人创建自己的网站时,文本框的光标有属于自己的风格.所以,尝试模拟文本框的光标,设计有自己风格的光 ...
- nested exception is java.sql.SQLException: Incorrect string value: '\xE7\x99\xBB\xE9\x99\x86...' for column 'image' at row 1
HTTP Status 500 - Hibernate operation: could not insert: [cn.itcast.shop.product.vo.Product]; uncate ...
- 打开TestFlight并链接到具体的应用下载界面
在我们应用正式上线前,许多时候都会有小流量的测试,选取部分核心用户抢先试用,在TestFlight出来之前,一般都是通过企业证书打包,然后提供给用户下载地址,安装测试使用,这个有个不爽之处就是,企业i ...
- jquery 实现内容的级联选取
- php and mysql 常用api函数
- FMX StringGrid向上滑动自动加载记录(二)
写完FMX StringGrid向上滑动自动加载记录(一)自己也觉得不理想,实现的别扭与复杂,现在找到更好的实现方法,原来,StringGrid从基类TCustomPresentedScrollBox ...
- WEB接口测试之Jmeter接口测试自动化 (一)
软件测试自动化从不同的测试阶段分类,可从下层到上层依次分为单元测试-->接口测试-->界面自动化测试. 单元测试一般有开发人员自行完成,而界面自动化测试合适的测试条件又很难达到,测试人员在 ...
- Android App data write as file data with synchronous Demo
package com.android.utils; import java.io.File; import java.io.IOException; import java.io.RandomAcc ...