Skip to content

Instantly share code, notes, and snippets.

@veirus
Last active October 27, 2020 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veirus/5eb960aa38dfa1285403ddd194a5944a to your computer and use it in GitHub Desktop.
Save veirus/5eb960aa38dfa1285403ddd194a5944a to your computer and use it in GitHub Desktop.
quickly share a picture from browser to somewhere else
#v::
; CoordMode, Mouse, Screen
SetKeyDelay, 200
;---------------------------
#IfWinNotActive, ahk_class MozillaWindowClass
WinActivate, MozillaWindowClass
; Send, {Click, right, 470, 674}{y}
Send, {Click, right, 960, 600}
#IfWinActive, ahk_class MozillaDropShadowWindowClass
{
clipboard := "" ; Empty the clipboard
Send, {y}
ClipWait, 3, 1
if ErrorLevel
{
MsgBox, The attempt to copy picture onto the clipboard failed.
return
}
; MsgBox, clipboard = %clipboard%
; return
}
Send, {Esc}
Send, x
;---------------------------
WinActivate, Telegram
Sleep, 500
Send, ^v
Sleep, 800
Send, {Enter}
Sleep, 250
;---------------------------
WinActivate, ahk_class MozillaWindowClass
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment