autohotkey switching within applications
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的更多相关文章
- Facebook技术架构
Facebook MySQL,Multifeed (a custom distributed system which takes the tens of thousands of updates f ...
- Application.HookMainWindow完全替代了原来的窗口过程(但是好像也会继续传递)
unit HookMain; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialo ...
- 点击Winform右下角图标,在最前端展示窗口
//调用Windows API 展示窗口到最前端 SwitchToThisWindow(this.Handle, true);//窗体的句柄 this.Handle SwitchToThisW ...
- QFileDialog::getOpenFileName() hangs
https://forum.qt.io/topic/49209/qfiledialog-getopenfilename-hangs-in-windows-when-using-the-native-d ...
- Oracle Applications Multiple Organizations Access Control for Custom Code
档 ID 420787.1 White Paper Oracle Applications Multiple Organizations Access Control for Custom Code ...
- 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 ...
- Stateful Kubernetes Applications Made Easier: PSO and FlashBlade
转自:https://medium.com/@joshua_robinson/stateful-kubernetes-applications-made-easier-pso-and-flashbla ...
- 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 ...
- 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 ...
- 13 Stream Processing Patterns for building Streaming and Realtime Applications
原文:https://iwringer.wordpress.com/2015/08/03/patterns-for-streaming-realtime-analytics/ Introduction ...
随机推荐
- yaml进阶用法
我们知道 json 是 yaml 的子集,作为超集的 yaml,必然有着很多与 json 不一样的特性,比如定义变量.引用.拼接等,下面来看看吧~ 为了方便和python的字典快速对比,我们直接使用y ...
- NOIP2022 总结
\(\text{summary}\) 怎么都没想到这次题目那么有新意:把这样的题 \(T2\) 放 \(T2\)...... 策略出现很大问题,赛后也意识到很多选手也会出现同样的问题:死磕 \(T2\ ...
- .Net6 微服务之Ocelot+IdentityServer4入门看这篇就够了
前言 .Net 6 使用 Consul 实现服务注册与发现 看这篇就够了.Net6 使用 Ocelot + Consul 看这篇就够了.Net6 微服务之Polly入门看这篇就够了 书接上文,本文将继 ...
- CPU持续100%分析并解决
背景 接到客户电话,说某系统数据库服务器CPU利用率从上午8点开始到现在基本上都是100%的情况,影响到了业务.让给看看是什么原因导致的,怎么紧急处理一下. 现象 查看CPU利用率,确实一直是90%以 ...
- mysql-8版本优化建议
mysql-8版本优化 参考官方文档:https://dev.mysql.com/doc/refman/8.0/en/
- HBase架构及读写流程
HBase架构: Client 访问HBase的接口并维护cache来加快对HBase的访问 Zookeeper 1.保证任何时候,集群中只有一个活跃master 2.存储所 ...
- 40.Ribbon和Feign
优先级:全局代码 < 全局属性 < 细粒度代码 < 细粒度属性 推荐属性配置
- 暴风影音16 v9.05.1202.1111 绿色版
修改历史:2022.12.14:自改官方 9.05.1202.1111 最新正式版本2022.06.27:自改官方 9.04.1029.1111 最新正式版本...... 修改内容:by.呆彤儿 / ...
- vue3 使用clodop打印插件实现不预览直接打印
一.下载安装C-LODOP https://www.lodop.net/download.html 解压文件后点击exe程序,启用服务 将上述的 LodopFuncs.js 文件放到工程某个文件下 二 ...
- 杭电oj 进制转换
Problem Description 输入一个十进制数N,将它转换成R进制数输出. Input 输入数据包含多个测试实例,每个测试实例包含两个整数N(32位整数)和R(2<=R<=1 ...