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 ...
随机推荐
- C++梳理
1.基础篇 1.C++ 中的四种智能指针 为什么要使⽤智能指针:智能指针其作⽤是管理⼀个指针,避免程序员申请的空间在函数结束时忘记释放,造成内存泄漏这种情况的发⽣.使⽤智能指针可以很⼤程度上的避免这个 ...
- Vue3从基础到精通
目录 一.Vue3介绍 1. Vue3的变化 2. Vue2和Vue3的不同之处 二.Vue3创建项目 1.用vue-lci创建步骤 2.用vite创建步骤 三.setup函数 四.ref.react ...
- 如何在VC++ 6.0中实现拖动指令改变执行路径?
前文提要: 在VC6.0之后出现的VS系列开发工具都具有的调试功能:移动指针更改执行流,VC6不支持这个UI操作. 调试程序暂停时,源代码或"反汇编"窗口边距处的黄色箭头标记要运行 ...
- 找素数(java)
什么是素数? 质数又称素数.一个大于1的自然数,除了1和它自身外,不能被其他自然数整除的数叫做质数:否则称为合数(规定1既不是质数也不是合数). 实际案例 比如我们想找出1-1000的所有素数 思路1 ...
- 2013-12-2 ISBN号码
问题描述 试题编号: 201312-2 试题名称: ISBN号码 时间限制: 1.0s 内存限制: 256.0MB 问题描述: 问题描述 每一本正式出版的图书都有一个ISBN号码与之对应,ISBN码包 ...
- [BSR文摘] 如何解释CRP正常而多普勒超声显示关节炎活动的RA亚型
如何解释CRP正常而多普勒超声显示关节炎活动的RA亚型 Braford CM, et al.Rheumatology 2016. Present ID: 72. 背景:临床门诊越来越多地利用肌肉骨骼超 ...
- CF873F - Forbidden Indices
题意:对于一个字符串 \(S\),有一些位置是被 \(\text{Ban}\) 掉的. 对于这个字符串的所有子串,它的分数是(长度 \(\times\) 在没有被 \(\text{Ban}\) 掉的位 ...
- CF884F - Anti-Palindromize
我们发现这个题的数据范围."字符和位置匹配"再加上一条奇怪的限制,长得就很网络流,那么就考虑如何用网络流做. 考虑重新解释一下这个题面,其实就是:给定一个字符集和 \(n\) 个位 ...
- Truenas core 13连接LDAP,获取AD域用户及自动分配权限---chatGPT回复,未做证实
要在TrueNAS Core 13上连接LDAP并从AD域中获取用户,请按照以下步骤操作: 在TrueNAS Core 13上登录到WebUI. 转到"网络"菜单并选择" ...
- nvm安装和管理nodejs
一.NVM简介 NVM 全称 Node Version Manager,是一个管理 NodeJS 版本的工具. NVM 默认只支持 Linux 和 OS X,不支持 Windows windows使用 ...