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. 解决Linux上tomcat解析war包中文文件乱码

    解决Linux上tomcat解析war包中文文件乱码 第一步 编辑tomcat/conf server.xml vim /usr/local/src/tomcat/conf/server.xml us ...

  2. RabbitMQ 延迟消息实战

    RabbitMQ 延迟消息实战 现实生活中有一些场景需要延迟或在特定时间发送消息,例如智能热水器需要 30 分钟后打开,未支付的订单或发送短信.电子邮件和推送通知下午 2:00 开始的促销活动. Ra ...

  3. 云小课|MRS数据分析-通过Spark Streaming作业消费Kafka数据

    阅识风云是华为云信息大咖,擅长将复杂信息多元化呈现,其出品的一张图(云图说).深入浅出的博文(云小课)或短视频(云视厅)总有一款能让您快速上手华为云.更多精彩内容请单击此处. 摘要:Spark Str ...

  4. GetShell 之:利用 SQLServer GetShell

    GetShell 之:利用 SQLServer GetShell 目录 GetShell 之:利用 SQLServer GetShell 1 SQLServer 基础操作 2 SQLServer 利用 ...

  5. 跳板攻击之:EarthWorm代理转发

    跳板攻击之:EarthWorm代理转发 目录 跳板攻击之:EarthWorm代理转发 1 EarthWorm官方介绍 2 官方使用方法: 2.1 环境 2.2 正向 SOCKS v5 服务器 2.3 ...

  6. 在线工具帮助医生在社区转诊时甄别SpA患者

    在线工具帮助医生在社区转诊时甄别SpA患者 Habibi S, et al. Rheumatology 2016. Present ID: 202. 背景:目前已开发了多种转诊策略以优化脊柱关节炎(S ...

  7. vue3中inject无法获取provide传递的最新的值

    // 爷组件  import { defineComponent, reactive, toRefs, onMounted, provide ,computed} from 'vue';  const ...

  8. 微信小程序扫码

    前言:微信小程序-->调用摄像头,扫描二维码/条形码,并获取信息,一连串操作,只需要调用微信小程序提供的 wx.scanCode API. 一.生成测试二维码 随便网上找个二维码生成器. 二.实 ...

  9. Docker中安装Gitlab详细全教程

    安装Docker: note: https://docs.docker.com/engine/install/centos/ 1 yum install -y yum-utils 2 yum-conf ...

  10. Python 20个常用库

    Requests.Kenneth Reitz写的最富盛名的http库.每个Python程序员都应该有它. Scrapy.如果你从事爬虫相关的工作,那么这个库也是必不可少的.用过它之后你就不会再想用别的 ...