Skip to content

Instantly share code, notes, and snippets.

View script 15.2.txt
set Replace_Me to "abc"
-- user input (up to 30) - position, size and name of window
set input1 to Replace_Me
set input2 to Replace_Me
set input3 to Replace_Me
set input4 to Replace_Me
set input5 to Replace_Me
set input6 to Replace_Me
set input7 to Replace_Me
set input8 to Replace_Me
View script 14.3
tell application "System Events"
set activeApp to (get name of first process where it is frontmost)
end tell
delay 0.03
set Replace_Me to "abc"
-- user input (up to 20) - based on active app name
set input1 to Replace_Me
set input2 to Replace_Me
set input3 to Replace_Me
set input4 to Replace_Me
View script 23.13
-- user options
set KillWindows_User to {"app1", "app2"}
set KillWindows_with_window to {"BCompare", "gimp", "soffice"}
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
-- If 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 {"Kill and Shut Down", "Kill and Restart", "Kill All Windows"}
set user_input to (choose from list input_list_choose with prompt "" with title "Script 23.13")
View script 23.12.txt
-- user options
set KillWindows_User to {"app1", "app2"}
set KillWindows_with_window to {"BCompare", "app2"}
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
-----------------------------------------------
set input_list_choose to {"Kill and Shut Down", "Kill and Restart", "Kill All Windows"}
set user_input to (choose from list input_list_choose with prompt "" with title "Script 23.12")
View script 1 for AutoKey - Ubuntu.py
"""
Requirements:
1. merge_images.py from https://github.com/255/merge-images/blob/master/merge_images.py (and requirements for running script)
2. yad (sudo apt install yad)
3. AutoKey (with gtk+, install via Ubuntu Software)
---------------------------------------------------
tested on AutoKey 0.95.10, Ubuntu 20.04.3 LTS
"""
View code_for_merge_images.py
import subprocess
import os
from datetime import datetime
utime = datetime.now()
utime2 = utime.strftime("%Y_%m_%d_%H.%M.%S")
output_file = '/Users/john/Desktop/output-combine_images_%s.png' % utime2
script_file = '/Users/john/Desktop/ori.py'
column = 0
View script 23.11.txt
-- user options
set KillWindows_User to {"app1", "app2"}
set KillWindows_with_window to {"BCompare", "app2"}
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
-----------------------------------------------
set input_list_choose to {"Kill and Shut Down", "Kill and Restart", "Kill All Windows"}
View script 23.10.txt
-- user options
set KillWindows_User to {"app1", "app2"}
set KillWindows_with_window to {"BCompare", "app2"}
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
-----------------------------------------------
set input_list_choose to {"Kill and Shut Down", "Kill and Restart", "Kill All Windows"}
View script 57.txt
tell application "System Events"
set activeApp to (get name of first process where it is frontmost)
end tell
tell application "System Events"
tell process activeApp
set docPath1 to value of attribute "AXDocument" of window 1
end tell
View Eject Key - Capture Screen - Rules for Karabiner-Elements.json
{
"title" : "Eject Key - Capture Full Screen | Hold - Selection",
"rules" : [
{
"description" : "Eject Key - Capture Full Screen | Hold - Selection",
"manipulators" : [
{
"from" : {
"consumer_key_code":"eject"
},