Skip to content

iamasink/scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

222 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

random scripts and AutoHotkey v2 stuff i use because im weird :)

My setup

Mouse: G502

  • Side / DPI shift - F21
  • DPI Up / G8 - F22
  • DPI Down / G7 - F23
  • Top middle / G9 - F24 you can change these using Logitech Onboard Memory Manager
    i dont use g-hub at all anymore.

Keyboard: Wooting 2 HE

  • A1 - F13
  • A2 - F14
  • A3 - F15
  • Mode - F16

The original functions for these keys (switching keyboard profile) are in the FN layer.

Tablet: Huion Q11k

haven;t used in ages so might not work but
Using OpenTabletDriver

  • Pen 1 - F17
  • Pen 2 - E
Plugins

WindowsInk Windows Ink absolute mode with Tip binding set to Windows Ink Pen Tip button

Auto startup

shell:startup

Visit shell:startup or %appdata%\Microsoft\Windows\Start Menu\Programs\Startup.
Scripts that don't need Administrator or to run before login go here.
I advise you use shortcuts instead of copying the file, so all scripts are in the same place, if you want to edit them.
The following scripts can go here:

  • there used to be stuff here but not anymore

Task Scheduler

Some things need to go in Task Scheduler because they run weirdly!
There are exported xml schedules you can import, but they may need modifying for your user.

  • Run main script at log on of any user, needs highest privileges

Secrets

In \secrets, text files are needed for some stuff

  • homeassistant.txt - homeassistant access token

Other scripts

scrcpy

  • Download latest Genymobile/scrcpy
  • Unzip scrcpy-win64-vx.x.x.zip to scrcpy\scrcpy\, so scrcpy.exe is at .\scrcpy\scrcpy\scrcpy.exe

yt-dlp

You may have to change the download location in the yt-dlp .bat scripts. It uses %userprofile%\Downloads by default.

stuff to change

keyboard switching

in "Text Services and Input Languages",
In Windows 10 you can find it in: Settings > Devices > Typing > Advanced keyboard settings > Input language hot keys.
In Windows 11, it's    Settings > Time & Language > Typing > Advanced keyboard settings > Input language hot keys.
ty https://superuser.com/a/1588984
set the following for the ahk script:
English is LAlt + Shift + 1
Japanese is LAlt + Shift + 2

Useful things for ahk

restart ahk script on save

put this in a script to reload it when you press ctrl+s, so its easier to test
nothing has to be changed per script, but you have to manually reload if you change the filename or stuff like that
ahk_exe can be changed to any other exe name for your editor
the tooltip flashes briefly when it reloads, so you know it worked

; reload the script when its saved
#HotIf WinActive(A_ScriptName " ahk_exe Code.exe")
~^s::
{
	ToolTip("Reloading " A_ScriptName ".", A_ScreenWidth / 2, A_ScreenHeight / 2)
	Sleep(250)
	Reload()
	Return
}

run a command and return the stdout

from https://www.autohotkey.com/boards/viewtopic.php?f=7&t=33596

; runs a command and returns the stdout  
JEE_RunGetStdOut(vTarget, vSize := "")
{
	DetectHiddenWindows(true)
	vComSpec := A_ComSpec ? A_ComSpec : A_ComSpec
	Run(vComSpec, , "Hide", &vPID)
	WinWait("ahk_pid " vPID)
	DllCall("kernel32\AttachConsole", "UInt", vPID)
	oShell := ComObject("WScript.Shell")
	oExec := oShell.Exec(vTarget)
	vStdOut := ""
	if !(vSize = "")
		VarSetStrCapacity(&vStdOut, vSize)
	while !oExec.StdOut.AtEndOfStream
		vStdOut := oExec.StdOut.ReadAll()
	DllCall("kernel32\FreeConsole")
	ProcessClose(vPID)
	DetectHiddenWindows(false)
	return vStdOut
}

keyboard keys

https://www.youtube.com/watch?v=kB2kIAEhjpE

About

Some AHK and .bat scripts I use

Topics

Resources

Stars

Watchers

Forks

Contributors