This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#IfWinActive ahk_exe Notepad.exe | |
$a:: | |
KeyWait,a | |
KeyWait,a,D T0.04 | |
If ErrorLevel | |
Send a | |
else | |
Send x | |
return | |
#IfWinActive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
F1:: | |
Winget,AppName,ProcessName,A | |
MsgBox,% AppName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$c:: | |
aDown:=A_TickCount | |
Keywait c | |
Duration:=(A_TickCount-aDown) | |
If (Duration>800) and WinActive("ahk_exe soffice.bin") | |
Send +^a | |
Else | |
Send c | |
Return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "title": "paste with right option", | |
"rules": [ | |
{ "description": "paste with right option", | |
"manipulators": [ | |
{"from": { "key_code": "right_option" }, | |
"parameters": {"basic.to_if_alone_timeout_milliseconds": 300}, | |
"to_if_alone": [{ | |
"key_code": "v", | |
"modifiers": [ | |
"left_command" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "title": "copy with right command", | |
"rules": [ | |
{ "description": "copy with right command", | |
"manipulators": [ | |
{"from": { "key_code": "right_command" }, | |
"parameters": {"basic.to_if_alone_timeout_milliseconds": 300}, | |
"to_if_alone": [{ | |
"key_code": "c", | |
"modifiers": [ | |
"left_command" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Important Note: This script will delete all files in the target folder including CloudRecordings.db, CloudRecordings.db-wal and CloudRecordings.db-shm. I assume those 3 files are about iCloud so if you use iCloud for Voice Memos, don't use this script. If you don't use iCloud for Voice Memos, what you should do is create multiple recordings for testing this script then test it. In the future, something may change this script might not work. You should prepare for that. | |
if application "VoiceMemos" is running then | |
tell application "VoiceMemos" to quit | |
end if | |
set info to system info | |
set userName to short user name of info | |
set upath to "/Users/" & userName & "/Library/Group Containers/group.com.apple.VoiceMemos.shared/Recordings" | |
set tar_path to quoted form of POSIX path of upath |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Stage Manager must be turned off | |
tell application "System Events" | |
tell application "Finder" | |
activate | |
delay 0.5 | |
set activewinname to get name of front window | |
set winc to count of windows | |
end tell | |
end tell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- user options | |
set KillWindows_User to {"app1", "app2"} | |
set KillWindows_with_window to {"BCompare", "gimp", "soffice", "sublime_text"} | |
set output_volume_before_shutdown_and_restart to "off" -- "on" or "off" | |
set output_volume to 0 -- you can set from 0 - 100 | |
-- end of user options | |
-- option 'KillWindows_User' is desinged for killing apps that sit in the menubar. If the name of app is not correct (case sensitive), that app won't be killed. To check a name of menubar app, use this code -- tell application "System Events" to set frontapps to get the name of every process whose background only is true -- copy from 'tell' to 'true' then paste in Script Editor, click menu 'Script', click 'Run', check the name in tab 'Result' at the bottom. | |
-- option 'KillWindows_with_window' is for the situation when script is interrupted by dialog "Choose Application" with message "Where is (app name)?", put the app name in the list "KillWindows_with_window" | |
----------------------------------------------- | |
set input_list_choose to |
NewerOlder