Created
November 30, 2020 12:16
-
-
Save CanYouJustWorkPlease/de51103e65d3a570c7bf90e45dc75267 to your computer and use it in GitHub Desktop.
Jumps to the start of bookmark text for Chrome stable in the quick bookmark adding panel
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
;~ You have to have installed Dark Reader Chrome extension, then take a snapshot of the extension's icon | |
;~ and save it on your PC. | |
;~ For it to work, you have to calculate the new values, as they are likely to differ from mine. | |
;~ Use Windows Spy, the AutoHotkey feature, to help in calculating the new values, coordinates. | |
;~ To use it, left click the star for adding a bookmark. As the panel opens, the cursor will jump at the | |
;~ start of the text. | |
;~ As an alternative, you can use CTRL + D hotkeys to achive the same, as their functionality | |
;~ was overriden with a new one. Also, this alternative is more reliable than the one with | |
;~ left clicking the star. | |
;~ This script is only useful when used in combination with the "Prepend !! VERY IMPORTANT to page title" bookmarklet | |
;~ and the like, which are found in my gists, because in some cases the title is so long that it prevents to check if the importance was indeed | |
;~ prepended to it, that's why the need of jumping at the start of the title during bookmark saving. | |
SetTitleMatchMode RegEx | |
#If WinActive("ahk_exe ^C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe$") | |
CoordMode Pixel | |
loop | |
{ | |
ImageSearch, FoundX, FoundY, 391, 30, 1230, 83, D:\Downloads\dark reader.png | |
x1 := FoundX - 102 | |
y1 := FoundY + 9 | |
x2 := x1 + 40 | |
y2 := y1 + 22 | |
if (ErrorLevel = 0) { | |
MouseGetPos, x,y | |
if (x > x1 and x < x2 and y > y1 and y < y2){ | |
GetKeyState, state, LButton | |
if (state = "D") { | |
Sleep, 100 | |
Send, {Home} | |
} | |
} | |
} | |
} | |
$^d:: Send, {LControl Down}{d Down}{d Up}{LControl Up}{Home} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment