subject: Add another shortcut for Listary

message: Add another shortcut for Listary

license: mit


old_contents:
email = %1%
passwrd = %2%

Checkd()
{
    WinWait Blizzard App Login, ,3
    WinMove 0, 0
    WinActivate

    IfWinNotActive
    {
        Checkd()
    }
    if ErrorLevel
    {
        MsgBox unable to find Battle.net login window. Please record trying to login and report it at j20.pw/bnethelp
        exit
    }
}
Checkd()
Sleep 2000
Checkd()
WinActivate
Checkd()
ClickFromTopRight(42,200)
Send ^a
Send {BS}
send %email%
sleep 20
Sleep 100
ClickFromTopRight(42,250)
Sleep 20
ClickFromTopRight(42,250)
Send ^a
Send {BS}
send %passwrd%
Send {Enter}
exit

ClickFromTopRight(_X,_Y){

CoordMode, mouse, Relative

WinGetActiveStats, Title, width, height, x,y

_X := width - _X

Click %_X%, %_Y%

}

new_contents:
email = %1%
passwrd = %2%

Checkd()
{
    WinWait Blizzard Battle.net Login, ,3
    WinMove 0, 0
    WinActivate

    IfWinNotActive
    {
        Checkd()
    }
    if ErrorLevel
    {
        MsgBox unable to find Battle.net login window. Please record trying to login and report it at j20.pw/bnethelp
        exit
    }
}
Checkd()
Sleep 2000
Checkd()
WinActivate
Checkd()
ClickFromTopRight(42,200)
Send ^a
Send {BS}
send %email%
sleep 20
Sleep 100
ClickFromTopRight(42,250)
Sleep 20
ClickFromTopRight(42,250)
Send ^a
Send {BS}
send %passwrd%
Send {Enter}
exit

ClickFromTopRight(_X,_Y){

CoordMode, mouse, Relative

WinGetActiveStats, Title, width, height, x,y

_X := width - _X

Click %_X%, %_Y%

}

subject: Update for new bnet title scheme

message: Update for new bnet title scheme


new_contents:
#InstallKeybdHook
#SingleInstance Force

; ahk_class PotPlayer

#SC01F::Send {Media_Play_Pause}

$+1::Send {!}
$+2::Send {@}
$+3::Send {#}
$+4::Send {$}
$+5::Send {`%}
$+6::Send {^}
;$+7::Send {&}
$+8::Send {*}

GetKeyboardLayout()
{
	HKL := DllCall("GetKeyboardLayout", "UInt", 0, "Ptr")
	Return HKL
}

GetKeyboardLayoutName()
{
	VarSetCapacity(Str, 1000)
	DllCall("GetKeyboardLayoutName", "Str", Str, "Int")
	Return Str
}

ActivateKeyboardLayout(HKL) ; This does not work.
{
	; For initialization, necessary to run only once.
	DllCall("Ole32.dll\OleInitialize", "Ptr", 0, "Int")
	DllCall("LoadKeyboardLayout", "Str", "00020409", "Int")

	T := DllCall("ActivateKeyboardLayout", "UInt", HKL, "UInt", 0x00000000, "PTR")
	If (!T)
	{
		MsgBox, Error
	}
}

Capslock::
	SetCapsLockState, Off
	If (Lang = 0)
	{
		PostMessage, 0x50, 0, 0xF0020409,, A
		Lang := 1
	}
	Else
	{
		PostMessage, 0x50, 0, 0xF03A0429,, A
		Lang := 0
	}
	Return

<^Capslock::
	SetCapsLockState, Off
	PostMessage, 0x50, 0, 0xF01A0409,, A
	Return

>^Capslock::
	SetCapsLockState, Off
	PostMessage, 0x50, 0, 0xF01B0409,, A
	Return

!Capslock::
	T := GetKeyboardLayout()
	H := Format("{1:X}", T)
	MsgBox, %T% %H%
	Return

Temp()
{
	;^1:: ; This line is commented out.
		T := GetKeyboardLayout()
		H := Format("{1:X}", T)
		MsgBox, %T% %H%
		Return

	;^2:: ; This line is commented out.
		;ActivateKeyboardLayout(0xF0020409)
		PostMessage, 0x50, 0, 0xF0020409,, A
		MsgBox, Done.
		Return
}

subject: Add hotkeys for changing keyboard language.

repos: Shayan-To/AutoHotkeyScripts


old_contents:
; ahk_class PotPlayer

#SC01F::Send {Media_Play_Pause}

subject: Add special characters for Persian keyboard.


old_contents:
FileEncoding, UTF-8 ; This file needs to be saved/encoded with "UTF-8 with BOM"

; Use Swedish characters on US-English keyboard
![:: Send, å
!+{:: Send, Å
!':: Send, ä
!+':: Send, Ä
!;:: Send, ö
!+;:: Send, Ö  ; does not work

; HHKB settings to mimic macOS behavior on Windows
; Lwin = <^
LWin::LCtrl
<^Right:: Send, {End}
<^Left:: Send, {Home}
<^Up:: Send, {PgUp}
<^Down:: Send, {PgDn}
<^Tab::Send {LWin down}{Tab}{LWin up}

new_contents:
FileEncoding, UTF-8 ; This file needs to be saved/encoded with "UTF-8 with BOM"

; Use Swedish characters on US-English keyboard
![:: Send, å
!+{:: Send, Å
!':: Send, ä
!+':: Send, Ä
!;:: Send, ö
!+;:: Send, Ö  ; does not work

; HHKB settings to mimic macOS behavior on Windows
LWin::LCtrl  ; this one is better to use SharpKeys for, as it is unreliable here
<^Right:: Send, {End}
<^Left:: Send, {Home}
<^Up:: Send, {PgUp}
<^Down:: Send, {PgDn}
<+^Up:: Send, {LShift down}{PgUp}{LShift up}
<+^Down:: Send, {LShift down}{PgDn}{LShift up}
<^Tab::Send {LWin down}{Tab}{LWin up}

subject: Add reliable setup in conjunction with SharpKeys


new_contents:
; Put this file in
; %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup

FileEncoding, UTF-8 ; This file needs to be saved/encoded with "UTF-8 with BOM"

; Use Swedish characters on US-English keyboard
![:: Send, å
!+{:: Send, Å
!':: Send, ä
!+':: Send, Ä
!;:: Send, ö
!+;:: Send, Ö

; HHKB settings to mimic macOS behavior on Windows
LWin::LCtrl  ; this one is better to use SharpKeys for, as it is unreliable here
<^Right:: Send, {End}
<^Left:: Send, {Home}
<^Up:: Send, {PgUp}
<^Down:: Send, {PgDn}
<+^Right:: Send, {LShift down}{End}{LShift up}
<+^Left:: Send, {LShift down}{Home}{LShift up}
<+^Up:: Send, {LShift down}{PgUp}{LShift up}
<+^Down:: Send, {LShift down}{PgDn}{LShift up}

; Windows laptop
AppsKey:: Send, {RWin}

subject: Add path onto which to store this file

message: Add path onto which to store this file


new_contents:
#Include, %A_ScriptDir%
#InstallKeybdHook
#SingleInstance, Force

Capslock & ScrollLock:: Send, {ScrollLock}
Capslock & Pause:: Send, {Pause}
ScrollLock::Home
Pause::End

Insert & Backspace::Send, {AppsKey}

subject: Add some device specific keyboard modifications.


new_contents:
+#Up::
  WinGetActiveTitle, Title
  WinRestore, %Title%
  SysGet, X1, 76
  SysGet, Y1, 77
  SysGet, Width, 78
  SysGet, Height, 79
  WinMove, %Title%,, X1, Y1, Width, Height
return

message: WIP: Add ahk-script to duplicate window width (useful with vertical monitors)


new_contents:
~WheelDown::
GoingDown := True
if GoingUp
{
    MsgBox, , Problem, Mouse wheel is jumping
    VarSetCapacity(GoingDown,0)
}
return

~WheelUp::
GoingUp := True
if GoingDown
{
    MsgBox, , Problem, Mouse wheel is jumping
    VarSetCapacity(GoingUp,0)
}
return

subject: Add simple AHK script to test mouse wheel jumping


new_contents:
email = %1%
passwrd = %2%

Checkd()
{
    WinWait Blizzard App Login, ,3
    WinMove 0, 0
    WinActivate

    IfWinNotActive
    {
        Checkd()
    }
    if ErrorLevel
    {
        MsgBox unable to find Battle.net login window. Please record trying to login and report it at j20.pw/bnethelp
        exit
    }
}
Checkd()
Sleep 2000
Checkd()
WinActivate
Checkd()
ClickFromTopRight(42,200)
Send ^a
Send {BS}
send %email%
sleep 20
Sleep 100
ClickFromTopRight(42,250)
Sleep 20
ClickFromTopRight(42,250)
Send ^a
Send {BS}
send %passwrd%
Send {Enter}
exit

ClickFromTopRight(_X,_Y){

CoordMode, mouse, Relative

WinGetActiveStats, Title, width, height, x,y

_X := width - _X

Click %_X%, %_Y%

}

subject: Update for new login window

message: Update for new login window


new_contents:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode, 1   ;matches if title begins with string
DetectHiddenText, off  ;will not search hidden window text
DetectHiddenWindows, off  ;will not detect hidden windows
WinWait, Sandboxie ahk_class #32770, DONE, 120
WinActivate
Send,{Enter}
ExitApp

subject: Add AHK for leftover debug dialog at completion of install/uninstall


new_contents:
#NoTrayIcon
#Persistent
#SingleInstance force
#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.

Send !+^{T}

subject: Add a script to launch the 'keep window on top' from other programs


new_contents:
#NoEnv
#NoTrayIcon
#SingleInstance force
#Warn

SendMode Input
SetTitleMatchMode, 3
SetWorkingDir, %A_ScriptDir%

procName := "ONENOTE.EXE"

; Set cursor to page title for all pages in the current section
!q::
IfWinActive, ahk_exe %ProcName%
{
    Send !{Home}
    Loop, 31 {
        Send ^+T
        Send {Home}
        Send ^{PgDn}
    }
}

subject: Add AHK script to reset cursor position for all pages in a section

license: unlicense


new_contents:
; Muhenkan (PC98 NFER key)
LWin::Send {vk1D}

; Henkan (PC98 XFER key)
;RWin::Send {vk1C}
;^RWin::Send {vk1C}
AppsKey::Send {vk1C}
^AppsKey::Send ^{vk1C}

;Muhenkan / 無変換 -> {vk1D}
;Henkan / 変換　-> {vk1C}
;Kana / かな -> {vkF2}
;IME ON/OF -> {vkF3}, {vkF4}

subject: Add AutoHotkey configuration for np2

message: Add AutoHotkey configuration for np2


new_contents:
Capslock::Ctrl

; Window management

#h::SendEvent #{Left}
#l::SendEvent #{Right}
#j::SendEvent #{Down}
#k::SendEvent #{Up}

; Windows Explorer Navigation

#IfWinActive, ahk_class CabinetWClass
^h::
   ControlGet renamestatus,Visible,,Edit1,A
   ControlGetFocus focussed, A
   if(renamestatus!=1&&(focussed=DirectUIHWND3?||focussed=SysTreeView321))
   {
    SendInput {Alt Left}
  }else{
      Send {Backspace}
  }
#IfWinActive

subject: Add small windows autohotkey script.

message: Add small windows autohotkey script.