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. Cesium 椭球大地测量EllipsoidGeodesic(十二)

    首先发现一个问题,这段代码会报错,原因是"DeveloperError: Expected value to be greater than or equal to0.0125, actua ...

  2. JZOJ 2022.07.06【提高组A】模拟

    历程 被暴打了 原因是钻进了 \(T4\) 的坑中... 先看完题,发现 \(T4\) 比较有意思,\(T2\) 没有想法 \(T3\) 挺容易,做法似乎很好想 \(T1\) 送分,十几分钟搞定 然后 ...

  3. JZOJ 5353. 【NOIP2017提高A组模拟9.9】村通网

    题目 为了加快社会主义现代化,建设新农村,农夫约(Farmer Jo)决定给农庄里每座建筑都连上互联网,方便未来随时随地网购农药. 他的农庄很大,有N 座建筑,但地理位置偏僻,网络信号很差. 一座建筑 ...

  4. XView 架构升级之路

    作者:京东零售 胡本奎 一 背景 1 是什么 XView是一个透明的塑料袋(容器),基于通用的webview框架改造而来,通常用于大促弹窗等营销场景,展现形式如下图: 2 痛点 在实际的开发使用中XV ...

  5. LeetCode-537 复数乘法

    来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/complex-number-multiplication 题目描述 复数 可以用字符串表示,遵循 ...

  6. vivado工具ila抓取的波形读取方法

    保存ila文件 file-->export-->export ila_data.可以保存为ila格式或者vcd格式 (可以在modelism下转化为wlf文件后打开查看波形.) 打开保存后 ...

  7. Source Insight 4.0 常用快捷键小记

    1. 括号配对高亮:"在前括号左侧,后括号左侧" 双击鼠标左键,可以选定匹配括号和其中内容(<>,(),L{R},[]之间) 高亮当前单词 : F8 语法窗口(隐藏/显 ...

  8. I2C接口(续一)

    I2C接口共涉及到18个寄存器,下面就来对它们进行具体分析. 先来看I2C配置寄存器CFG,下表是它的全部位结构,其地址分别为0x40050000(I2C0),0x40054000(I2C1),0x4 ...

  9. shiyansi

    #include <stdio.h> #include <stdlib.h> #define N 1000 int fun(int n,int m,int bb[N]) { i ...

  10. 用到的jar包作用随笔,吼吼

    名称 版本 说明 spring spring.jar(2.5) spring基础包                   公司基础包 isskill-pro0.7.1.2.jar(0.7.1.2) 包含 ...