Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv
- #Persistent
- #MaxHotkeysPerInterval, 5000
- #SingleInstance, force
- SetBatchLines, -1
- SendMode Input
- SetWinDelay, 0
- SetMouseDelay,0
- SetKeyDelay, -1
- CoordMode, MOUSE, Screen
- DetectHiddenWindows, Off
- RClick = 0
- Menu Tray, Icon, Imageres.dll, 106
- Menu, Tray, Click, 1
- Menu, Tray, NoStandard
- Menu, Tray, Add, Quit, GuiClose
- Menu, Tray, Icon, Quit, Imageres.dll, 219
- Menu, Tray, Default, Quit
- Gui, 1: +LastFound +AlwaysOnTop -caption +ToolWindow +E0x08000000
- Gui, 1: Margin, 0, 0
- Gui, 1: -dpiscale
- Gui, 1: Color, fdfdfd
- Gui_1_ID := WinExist()
- Gui, 1: Add, Picture, x0 y50 w100 h100 Icon106 vPicture2 gNextRightClick, imageres.dll
- Gui, 1: Add, Picture, x0 y0 w50 h50 Icon149 gMoveGui, imageres.dll
- Gui, 1: Show, Autosize
- WinSet, Transcolor, fdfdfd
- SetTimer, Keep_On_Top, 60
- Return
- NextRightClick:
- RClick = 1
- Return
- #If RClick = 1
- LButton::
- Click right
- RClick = 0
- Return
- #If
- F9::
- Reload
- Return
- MoveGui:
- If GetKeyState("LButton","d")
- DragNotActivate(Gui_1_ID)
- Return
- ; Function by Learning one
- DragNotActivate(hwnd,WhileKeyDown="LButton") {
- CoordMode, Mouse, Screen
- MouseGetPos, mx,my
- WinGetPos, wx,wy,,, ahk_id %hwnd%
- offsetX := mx-wx, offsetY := my-wy
- owd := A_WinDelay
- SetWinDelay, -1
- While (GetKeyState(WhileKeyDown,"d")) {
- Sleep, 20
- MouseGetPos, x,y
- WinMove, ahk_id %hwnd%,, x-offsetX,y-offsetY
- }
- ;CoordMode, Menu, Relative
- SetWinDelay, %owd%
- }
- Keep_On_Top:
- WinSet, AlwaysOnTop, ON, ahk_id %Gui_1_ID%
- Return
- GuiClose:
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement