autohotkey AHK:打开CHM帮助文档

AHK:打开CHM帮助文档并且自动查找剪贴板中的内容。

ahkchm.ahk
#h::
  IfWinExist, ahk_class HH Parent
  {
      WinActivate  ; 自动使用上面找到的窗口.
      WinMaximize  ; 同上
    Sleep, 200
  }
  else
  {
    Run, "D:\SynFile\CloudSoft\AutoHotkey\AutoHotkey.chm",, Max
    Sleep, 700
    WinActivate
  }
  Send !n           ; Alt+N 切换到索引标签,并且焦点会自动聚焦到Edit控件上
  ControlGetFocus, CtrlName ; 获取Edit控件名称
  ControlSetText, %CtrlName%, %ClipBoard%, ahk_class HH Parent  ; 设置搜索框内容
  Send {Enter}        ; 回车确认检索
Return

autohotkey AHK,命令行参数

args
argv = %0%
flag1 = %1%

autohotkey 华民:添加打开方式

添加打开方式

add_open_ways
F4::
send,^c
clipwait
sleep 500 ;wait copying file name into clipboard, otherwise will show file name of last time
fileName = "%clipboard%" ; in case there is space in file path
run "H:\Program Files\f4menu_0.59\F4Menu.exe" -m %fileName% ;please replace yourFaMenuPath with absolutely file path of F4Menu.exe
return

autohotkey Autohotkey托盘信息

Autohotkey托盘信息

ahk_tray_info.ahk
test := TrayIcon_GetInfo()
Loop % test.MaxIndex()
    MsgBox, % test[A_Index].process

autohotkey 将Alt + Tab替换为任意键。

将Alt + Tab替换为任意键。

ffxiv_safety_alt_tab.ahk
#IfWinActive ahk_class FFXIVGAME
{
    ; Alt+Tabを;に置き換え
    !Tab::;

    ; Windowsキー + Tabを無効化
    #Tab::Return

    ; 左Windowsキーを無効化
    LWin::Return
}

autohotkey 休眠AHK脚本。

休眠AHK脚本。

Sleep.ahk
Run, C:\Windows\System32\rundll32.exe PowrProf.dll`,SetSuspendState Sleep

autohotkey AHK:只打开一个程序实例

AHK:只打开一个程序实例,根据窗口的状态选择来打开窗口,激活窗口,最小化窗口之中的一个,确保只打开一个窗口实例。

只打开程序的一个实例2.ahk
activeOrMin(softPath,wintitle)
{
    IfWinNotExist,%wintitle%
        Run, %softPath%
    Else
    {
        WinGet,minORMax,MinMax
        if minORmax = -1
            WinActivate,%wintitle%
        Else
            WinMinimize,%wintitle%
    }
}
只打开程序的一个实例.ahk
#g::
	DetectHiddenWindows, On
	SetTitleMatchMode, 2
	WinGet, winid, ID, Google Chrome
	;MsgBox,%winid%
	SetTitleMatchMode, 1
	If (winid) {
		WinWait, ahk_id %winid%
		WinShow
		WinActivate
		ControlFocus, EditComponent2, A
		ControlSetText, EditComponent2,, A
	}else{
		RunOrActivateProgram("C:\Users\default\AppData\Local\Google\Chrome\Application\chrome.exe --enable-benchmarking")
	}
	DetectHiddenWindows, Off
return

autohotkey AutoHotkey脚本,用于在Windows PC上同时使用F按钮使用Mac媒体按钮

AutoHotkey脚本,用于在Windows PC上同时使用F按钮使用Mac媒体按钮

MacMediaButtons.ahk
UseMediaButtons := true

;;;Disable using by F14 button;;;

F14::
	UseMediaButtons := !UseMediaButtons
;	MsgBox %UseMediaButtons%

	if (!UseMediaButtons) {
		Hotkey, F7, off
		Hotkey, F8, off
		Hotkey, F9, off
		Hotkey, F10, off
		Hotkey, F11, off
		Hotkey, F12, off
		Hotkey, F13 & F7, off
		Hotkey, F13 & F8, off
		Hotkey, F13 & F9, off
		Hotkey, F13 & F10, off
		Hotkey, F13 & F11, off
		Hotkey, F13 & F12, off

		MsgBox Media buttons are disabled
	} else {
		Hotkey, F7, on
		Hotkey, F8, on
		Hotkey, F9, on
		Hotkey, F10, on
		Hotkey, F11, on
		Hotkey, F12, on
		Hotkey, F13 & F7, on
		Hotkey, F13 & F8, on
		Hotkey, F13 & F9, on
		Hotkey, F13 & F10, on
		Hotkey, F13 & F11, on
		Hotkey, F13 & F12, on

		MsgBox Media buttons are enabled
	}

	return

$F7::Send {Media_Prev}
$F8::Send {Media_Play_Pause}
$F9::Send {Media_Next}
$F10::Send {Volume_Mute}
$F11::Send {Volume_Down}
$F12::Send {Volume_Up}

;;;Original F button via F13+ shorcut;;;

F13 & F7::Send {F7}
F13 & F8::Send {F8}
F13 & F9::Send {F9}
F13 & F10::Send {F10}
F13 & F11::Send {F11}
F13 & F12::Send {F12}

;;; Actual version:
;;; https://bitbucket.org/dima-loburec/working-environment/src/master/mac/MacMediaButtons.ahk

autohotkey 键盘快捷键

键盘快捷键

windows.ahk
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

; Close active window
!q::Send !{F4}
web-search.ahk
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

^!s::
{
 Send, ^c
 Sleep 50
 Run, http://www.google.com/search?q=%clipboard%
 Return
}
ubuntu.ahk
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

; Run Ubuntu bash shell
^!+q::
	run, %comspec% 
	WinWait, ahk_class ConsoleWindowClass
	WinWaitActive, ahk_class ConsoleWindowClass
	send cd .. {Enter}
	send bash {Enter}
	send clear {Enter}
media.ahk
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

; Media shortcuts
^!Left::Send   {Media_Prev} 
^!Down::Send   {Media_Play_Pause} 
^!Right::Send  {Media_Next} 
+^!Left::Send  {Volume_Down} 
+^!Down::Send  {Volume_Mute} 
+^!Right::Send {Volume_Up} 
academy-search.ahk
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

+^!s::
{
 Send, ^c
 Sleep 50
 Run, http://telerikacademy.com/search/results?search=%clipboard%
 Return
}

autohotkey cambiar permisos a archivos y directorios

cambiar permisos a archivos y directorios

permisos.ahk
folders:
find dia-theme/ -type d -exec chmod 664 {} +

archivos:
find dia-theme/ -type f -exec chmod 664 {} +