Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* INFO
- NAJEEB SAVE MULTIPLE ITEMS TO CLIPBOARD
- Written by: Najeeb Shah Khan (najeebshahkhan@gmail.com)
- Last Modified: 4-6-2023
- */
- ;#warn
- #NoEnv
- #LTrim
- #SingleInstance, Force
- Process, Priority, , A
- SendMode, Input
- SetBatchLines, -1
- ;#NoTrayIcon
- SetKeyDelay 0 ; In case SendInput is not available
- SetTitleMatchMode RegEx
- SetWorkingDir %A_WorkingDir% ;%A_ScriptDir%
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- FileCreateDir, %A_ScriptDir%\DATA
- FileInstall , CLIPBOARD2.ahk, %A_ScriptDir%\DATA\CLIPBOARD2.ahk, 1
- FileInstall , S12.she, %A_ScriptDir%\DATA\S12.she, 1
- FileInstall , SkinH_EL.dll, %A_ScriptDir%\DATA\SkinH_EL.dll, 1
- FileSetAttrib +HS, %A_ScriptDir%\DATA\CLIPBOARD2.ahk, 2
- FileSetAttrib +HS, %A_ScriptDir%\DATA\S12.she, 2
- FileSetAttrib +HS, %A_ScriptDir%\DATA\SkinH_EL.dll, 2
- FileSetAttrib +HS, %A_ScriptDir%\DATA, 2
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- SkinForm(Apply, A_ScriptDir . "\DATA\SkinH_EL.dll", A_ScriptDir . "\DATA\S12.she")
- OnExit, GetOut
- CustomColor = FFFF99
- Gui, Color, %CustomColor%
- Global clip := [], max := 20, choices, clipNum
- Gui, Font, s12
- Gui, Add, ListBox, w800 r21 AltSubmit vclipNum
- Gui, Add, Button, xm ym Hidden Default gWM_LBUTTONUP, OK
- OnClipboardChange("clipChanged"), OnMessage(WM_LBUTTONUP := 0x0202, "WM_LBUTTONUP")
- F12::Gui, Show,, Najeeb Clipboard
- GuiEscape:
- GuiClose:
- Gui, Hide
- Return
- clipChanged(type) {
- If (type != 1)
- Return
- SoundBeep, 2500
- If clip.Count() = max
- clip.RemoveAt(max), choices := RegExReplace(choices, ".+\K\|.*")
- clip.InsertAt(1, Clipboard)
- GuiControl,, clipNum
- , % choices := "|" SubStr(Clipboard, 1, 25) "||" Trim(StrReplace(choices, "||", "|"), "|")
- }
- WM_LBUTTONUP(wParam := "", lParam := "") { ; User clicked on the GUI
- Gui, Submit
- Sleep, 25
- SendInput % "{Text}" clip[clipNum]
- Sleep, 50
- Gosub, F12
- }
- ;-=-=-=-=-=-=-=-=-=-=-=-=-About-=-=-=-=-=-=-=-=-=-=-=-
- ^H::
- MsgBox, , About ShowHide,
- (
- This program will ClipBoard Text And Files List To
- Write Notepade .
- The defined hotkeys are:
- Ctrl+C Selected Text Copy To ClipBoard
- F12 ClipBoard Show Windows
- ESC ExitApp
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- Works on both Windows XP and Windows 7
- By Najeeb Shah Khan 2022
- )
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- GetOut:
- ;GuiClose:
- Gui, Hide
- SkinForm(0)
- ExitApp
- return
- SkinForm(Param1 = "Apply", DLL = "", SkinName = ""){
- if(Param1 = Apply){
- DllCall("LoadLibrary", str, DLL)
- DllCall(DLL . "\SkinH_AttachEx", AStr,SkinName, Str,"mhgd")
- }else if(Param1 = 0){
- DllCall(DLL . "\USkinExit")
- }
- }
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #R::Reload ;<-- ~ Reload Script ~
- #S::Suspend ;<-- ~ Suspend Script ~
- #P::Pause ;<-- ~ Pause Script ~
- #M::WinMinimize, ;<-- ~ Minimize Script ~
- ESC::ExitApp ;<-- ~ Exit Script ~
- ;=-=-=-=-=-=-=-=-=-=- END SCRIPT -=-=-=-=-=-=-=-=-=-=-=-
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement