Last active
December 12, 2020 02:57
-
-
Save emisjerry/6e51066b64b9c94d393ac7c18e876da8 to your computer and use it in GitHub Desktop.
Find text from a web page and execute it locally
This file contains 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
#SingleInstance Force | |
#IfWinActive, ahk_exe chrome.exe | |
f2:: | |
Send ^a | |
send ^c | |
text = %Clipboard% | |
; 找網址 | |
RegExMatch(text, "z:\\test\\mp4\\(.*)\.mp4", file) | |
MsgBox 網址=%URL% | |
Run %file% | |
Clipboard = %URL% | |
Return | |
#IfWinActive |
This file contains 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
#SingleInstance Force | |
#IfWinActive, ahk_exe chrome.exe | |
f1:: | |
Send ^a | |
send ^c | |
text = %Clipboard% | |
msgbox text=%text% | |
; 找檔名 | |
RegExMatch(text, "z:\\test\\mp4\\(.*)\.mp4", file) | |
MsgBox mp4檔名=%file% | |
Clipboard = %file% | |
; 找網址 | |
RegExMatch(text, "http(.?)://(.*)\.jpg", URL) | |
MsgBox 網址=%URL% | |
Clipboard = %URL% | |
; 找磁力鏈結 | |
RegExMatch(text, "magnet:\?xt=urn:(.*)", URL) | |
MsgBox 磁力鏈結=%URL% | |
Clipboard = %URL% | |
Return | |
#IfWinActive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment