[AHK]利用AutoHotkey辅助设计
2016-12-26 20:26
344 查看
抛砖引玉
案例1:在cad里边的用热字串辅助输入 这样画图快,比如rec100,这类rec后面的XXX数值不固定的,从10到10000吧
案例2:在3DSMAX中直接用快捷键将对象Z坐标旋转90度,因为旋转90用的最多,这样就不用老是在移动和旋转之间切换.
效果:
只在3dsmax界面上生效的热键,这个就只是在max的Label1窗口起作用,
在其他地方6还是6,
#If ActiveControlIs("Label1")
6::Send {F5}
7::MsgBox
#If
ActiveControlIs(Control) {
ControlGetFocus, FocusedControl, A
return (FocusedControl=Control)
}
案例3:以下是用于减小PhotoShop占用内存的示范,可以改造成定时调用EmptyMem
案例1:在cad里边的用热字串辅助输入 这样画图快,比如rec100,这类rec后面的XXX数值不固定的,从10到10000吧
:*:rec:: Input, UserInput, V T5 L5 C, {enter}.{esc}{tab}, * if UserInput is integer { send rec{space}{click}d{space}%UserInput%{space}%UserInput%{space}{click} } return
案例2:在3DSMAX中直接用快捷键将对象Z坐标旋转90度,因为旋转90用的最多,这样就不用老是在移动和旋转之间切换.
^+R:: test = rotate $ (angleaxis 90 [0,0,1]) ControlFocus, MXS_Scintilla2, ahk_exe 3dsmax.exe ControlSetText, MXS_Scintilla2, %test%, ahk_exe 3dsmax.exe send, +{Enter} Return
效果:
只在3dsmax界面上生效的热键,这个就只是在max的Label1窗口起作用,
在其他地方6还是6,
#If ActiveControlIs("Label1")
6::Send {F5}
7::MsgBox
#If
ActiveControlIs(Control) {
ControlGetFocus, FocusedControl, A
return (FocusedControl=Control)
}
案例3:以下是用于减小PhotoShop占用内存的示范,可以改造成定时调用EmptyMem
Run, "C:\Program Files\Adobe\Adobe Photoshop CS3\Photoshop.exe",,,PID ;取得 PID WinWait, ahk_class Photoshop ;等待窗口出现 Sleep, 10000 ;应用之前须保证 photoshop 启动加载完毕 EmptyMem(PID) ;将第一行取得的 photoshop 的 PID 放在这里 Exitapp EmptyMem(PID="AHK Rocks"){ pid:=(pid="AHK Rocks") ? DllCall("GetCurrentProcessId") : pid h:=DllCall("OpenProcess", "UInt", 0x001F0FFF, "Int", 0, "Int", pid) DllCall("SetProcessWorkingSetSize", "UInt", h, "Int", -1, "Int", -1) DllCall("CloseHandle", "Int", h) }
相关文章推荐
- UML辅助网站规划和设计指南
- Java图形设计中,利用Bresenham算法实现直线线型,线宽的控制(NO 2D GRAPHICS)
- 利用UML类图设计Java应用程序详解(二)
- 利用XML进行GUI设计与运行时显示------基于GTK+/Gtkmm的Glade/libglade/libglademm
- 利用asp.net 2.0构建企业级门户平台(1、设计思想)
- 利用ASP.NET构建网上考试系统(转)不错的设计方案。让我的开发有了新的想法
- 设计模式:利用C#的Delegate来改进Observer模式
- 利用VB6.0设计屏幕保护程序
- 利用静态内部类为您的代码添加辅助功能
- 设计模式:利用Command模式实现无限次数的Undo/Redo功能
- 利用UML类图设计Java应用程序详解(一)
- 利用UML类图设计Java应用程序详解(二)
- 利用UML类图设计Java应用程序详解(一)
- 利用UML类图设计Java应用程序详解(二)
- 利用高级Java、算法、三角学、分布计算设计自己的智能机器人
- Mobile.v1.0移动电话辅助软件界面设计
- mono:利用glade设计界面
- 利用VB.NET设计Web菜单组件
- 面向搜索引擎的内容管理系统(CMS)设计——利用Squid反相代理缓存实现网站内容静态发布
- 利用WSS做后台存储--设计一个统一的信息发布平台