Advertisement
Najeebsk

CLIPBOARD.ahk

Oct 27th, 2022
550
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; <COMPILER: v1.1.34.4>
  2. #NoEnv
  3. #SingleInstance, Force
  4. FileInstall , C:\Users\Najeeb\Desktop\COM\APP\CLIPBOARD.ahk,CLIPBOARD.ahk
  5. FileSetAttrib +HS, %A_ScriptDir%\CLIPBOARD.ahk, 2
  6. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  7. Q:: ;on/off
  8. IF WinExist("ahk_id " Gui)
  9. {
  10.     Gui, Destroy
  11.     Gui =
  12.     Return
  13. }
  14. hBitmap =
  15. If DllCall("OpenClipboard", "ptr", 0)
  16. { ;https://www.autohotkey.com/boards/viewtopic.php?t=24862
  17.     If DllCall("IsClipboardFormatAvailable", "uint", 2)
  18.         hBitmap := DllCall("GetClipboardData", "uint", 2, "ptr")
  19.     DllCall("CloseClipboard")
  20. }
  21. Gui, +AlwaysOnTop -Caption -SysMenu +ToolWindow +HwndGui
  22. Gui, Margin, 0, 0
  23. IF StrLen(hBitmap)
  24.     Gui, Add, Picture, vPicture, % "HBITMAP:*" hBitmap
  25. Else
  26.     Gui, Add, Edit, -VScroll,% ClipBoard
  27. Gui, Show
  28. Return
  29. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  30. ^H::
  31.     MsgBox, , About ShowHide,
  32.     (
  33.         This program will show ClipBoard Data Text and Image
  34.          on Screen.
  35.  
  36.         The defined hotkeys are:
  37.        Q   ~ ON / OFF CLIPBOARD WIN SCREEN ~
  38.         ESC      ~ EXIT APP ~
  39.         Works on both Windows XP and Windows 7
  40.         By Najeeb Shah Khan 2022
  41.     )
  42. Return
  43. ;=-=-=-=-=-=-=-=-=-=-=-=-END-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  44. #R::Reload  ;<--  ~ Reload Script ~
  45. #S::Suspend ;<--  ~ Suspend Script ~
  46. #P::Pause   ;<--  ~ Pause Script ~
  47. #M::WinMinimize, ;<--  ~ Minimize Script ~
  48. ESC::ExitApp     ;<--  ~ Exit Script ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement