class QdirManager {
ppid := -1
ppath := ""
__New(pathIn) {
this.ppath := pathIn
}
__Delete() {
}
init() {
Run(this.ppath, , , &ppidTmp)
this.ppid := ppidTmp
; waiting window initialization
Loop 20 {
Sleep(50)
if (WinExist("ahk_pid " this.ppid) > 0) {
break
}
}
WinActivate("ahk_pid " this.ppid)
}
bringFront() {
; ; MsgBox(WinExist("ahk_pid " this.ppid))
; if (WinExist("ahk_pid " this.ppid)) {
; WinActivate("ahk_pid " this.ppid)
; }
oList := WinGetList("ahk_exe" this.ppath, , ,) ; ahk_id
if (oList.Length >= 1) {
this.ppid := WinGetPID("ahk_id " oList[1])
WinActivate("ahk_pid " this.ppid)
}
else {
this.init()
} ; flash across
myGui := Gui("+AlwaysOnTop -Caption +LastFound -SysMenu +ToolWindow -DPIScale +E0x20", "myGui")
WinSetTransparent(100, myGui)
myGui.BackColor := "EEAA99"
myGui.Show("x0 y0 w" . A_ScreenWidth - 300 . " h" . A_ScreenHeight - 300)
Sleep(100)
myGui.Destroy()
}
} global glb_qdirManager1 := QdirManager("D:\tool\Q-Dir-AA\Q-Dir_x64.exe")
global glb_qdirManager2 := QdirManager("D:\tool\Q-Dir-AB\Q-Dir_x64.exe")
global glb_qdirManager3 := QdirManager("C:\Program Files (x86)\UltraExplorer\UltraExplorer.exe")
#q:: {
glb_qdirManager1.bringFront()
}
#w:: {
glb_qdirManager2.bringFront()
}
#e:: {
glb_qdirManager3.bringFront()
} win_No(pp) {
; pp := "D:\Program Files\Notepad++\notepad++.exe"
winlist := WinGetList("ahk_exe " . pp)
if (winlist.Length = 0) {
Run(pp, , , &ppidTmp)
; waiting window initialization
Loop 20 {
Sleep(50)
if (WinExist("ahk_pid " ppidTmp) > 0) {
break
}
}
WinActivate("ahk_pid " ppidTmp)
}
else {
WinActivate("ahk_exe " . pp)
} ; flash across
myGui := Gui("+AlwaysOnTop -Caption +LastFound -SysMenu +ToolWindow -DPIScale +E0x20", "myGui")
WinSetTransparent(100, myGui)
myGui.BackColor := "EEAA99"
myGui.Show("x0 y0 w" . A_ScreenWidth - 300 . " h" . A_ScreenHeight - 300)
Sleep(100)
myGui.Destroy()
}
#1:: win_No("C:\Program Files\Google\Chrome\Application\chrome.exe")
#2:: win_No("D:\Programs\Microsoft VS Code\Code.exe")
#3:: win_No("C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe") ; F4:: ExitApp 3333

in q-dir, press F3 to search with everything

F3:: {
if (WinActive("ahk_exe Q-Dir_x64.exe")) {
Send("{CtrlDown}{ShiftDown}c{ShiftUp}{CtrlUp}")
ss := Trim(A_Clipboard, "`\")
cmd := "D:\Program` Files\Everything\Everything.exe -path " . ss
Run(cmd) ; MsgBox(cmd)
}
else {
Send("F3")
}
return
}

autohotkey switching within applications的更多相关文章

  1. Facebook技术架构

    Facebook MySQL,Multifeed (a custom distributed system which takes the tens of thousands of updates f ...

  2. Application.HookMainWindow完全替代了原来的窗口过程(但是好像也会继续传递)

    unit HookMain; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialo ...

  3. 点击Winform右下角图标,在最前端展示窗口

    //调用Windows API 展示窗口到最前端 SwitchToThisWindow(this.Handle, true);//窗体的句柄 this.Handle     SwitchToThisW ...

  4. QFileDialog::getOpenFileName() hangs

    https://forum.qt.io/topic/49209/qfiledialog-getopenfilename-hangs-in-windows-when-using-the-native-d ...

  5. Oracle Applications Multiple Organizations Access Control for Custom Code

    档 ID 420787.1 White Paper Oracle Applications Multiple Organizations Access Control for Custom Code ...

  6. How use Instruments and display the console in Command Lines applications

    I'm using Xcode on OSX to develop command line C applications. I would also like to use Instruments ...

  7. Stateful Kubernetes Applications Made Easier: PSO and FlashBlade

    转自:https://medium.com/@joshua_robinson/stateful-kubernetes-applications-made-easier-pso-and-flashbla ...

  8. Digital Adjustment of DC-DC Converter Output Voltage in Portable Applications

    http://pdfserv.maximintegrated.com/en/an/AN818.pdf http://www.maximintegrated.com/app-notes/index.mv ...

  9. Changing the Output Voltage of a Switching Regulator on the Fly

    http://www.powerguru.org/changing-the-output-voltage-of-a-switching-regulator-on-the-fly/ There are ...

  10. 13 Stream Processing Patterns for building Streaming and Realtime Applications

    原文:https://iwringer.wordpress.com/2015/08/03/patterns-for-streaming-realtime-analytics/ Introduction ...

随机推荐

  1. 三年观察揭示TNF抑制剂持续改善强柱患者躯体功能的预测因子

    标签:强直性脊柱炎; TNF抑制剂; 躯体功能; 预测因子 一项为期3年的观察研究揭示TNF抑制剂持续改善强直性脊柱炎患者躯体功能的预测因子 电邮发布日期:2016年3月28日 文献出处: van W ...

  2. element-ui中rules使用正则验证、表单验证

    <template> <el-form :model="DataForm" label-position="top" :rules=" ...

  3. OpenLayers集成ECharts

    1. 引言 OpenLayers是WebGIS中常用的开源JavaScript前端库,ECharts是常用的可视化开源JavaScript前端库 OpenLayers官网:OpenLayers - W ...

  4. PostgreSQL 按拼音排序 - convert to GBK/EUC_CN coding

    背景 国内的应用,在文本排序上基本都是按照拼音来进行排序的. 在不同的字符集中,汉字的编码可能不一样,比如UTF8和GBK,其中GBK是按拼音的顺序进行编码的,而UTF8则不是. 所以如果你的数据库使 ...

  5. API 小白入门教程

    正如汽车行业必须达到一定的规模,才能让企业只生产一个部件.软件产业现在已经足够大了,尤其当你接受所谓的"软件吞噬世界"此类的说法时更是如此.因此,和汽车工业不再生产自己的钢铁一样, ...

  6. 四,redis6版本的使用部署

    继第三章(https://www.cnblogs.com/123456likun/p/13841540.html) 官网发布最新的6版本,有新的数据类型出现,给了小编我极大的动力,决定写几张关于最新的 ...

  7. HDFS存储流程及HA

    HDFS架构 主从(Master/Slaves)架构 由一个NameNode和一些DataNode组成 NameNode负责存储和管理文件元数据,并维护了一个层次型的文件目录树 DataNode负责存 ...

  8. 【1】部署环境python+pycharm+JDK+SDK+node安装+appium安装+Appium-python-client安装及配置+(模拟器)

    安装SDK检查命令  adb doctor 安装JDK,SDK是为了手机端应用程序的访问去做的基础库的搭建 JDK,SDK环境变量需要在一块,不要一个上,一个下 JAVA_HOME  Path  在一 ...

  9. VUE学习-优化过渡

    过渡(优化) 可复用的过渡 <transition> 或者 <transition-group>为根的组件 Vue.component('my-special-transiti ...

  10. Java使用Calendar获取月最大天数

    Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, year); calendar.set(Calendar ...