Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Requires AutoHotkey v2.0
- #SingleInstance Force
- ClipboardChanged := True
- TextFileName := ""
- HeaderName := ""
- Numpad7::
- {
- Global
- ClipboardChanged := !ClipboardChanged
- ToolTip (ClipboardChanged ? "enabled" : "disabled")
- Sleep 1200
- ToolTip ""
- }
- NumpadAdd::
- {
- Global
- Try
- {
- If !(TextFileName = "")
- {
- Run TextFileName ".txt"
- WinWaitActive TextFileName ".txt - Notepad"
- WinActivate TextFileName ".txt - Notepad"
- Send "^{End}"
- }
- Else
- {
- Run "Clipboard Stash.txt"
- WinWaitActive "Clipboard Stash.txt - Notepad"
- WinActivate "Clipboard Stash.txt - Notepad"
- Send "^{End}"
- }
- }
- Catch
- {
- MsgBox "No file to load"
- }
- }
- NumpadMult::
- {
- Global
- IB_HeaderName := InputBox("Enter a Header")
- HeaderName := IB_HeaderName.Value
- }
- NumpadSub::
- {
- Global
- IB_TextFileName := InputBox("Enter a File Name")
- TextFileName := IB_TextFileName.Value
- }
- Numpad8::
- {
- Reload
- }
- Numpad9::
- {
- ExitApp
- }
- OnClipboardChange ClipChanged
- ClipChanged(*)
- {
- Global
- If (ClipboardChanged)
- {
- If !(TextFileName = "")
- {
- If !(HeaderName = "")
- {
- FileAppend("--------------------------------------------------------------------------------`n" HeaderName "`n`n" A_Clipboard "`n", TextFileName ".txt")
- F_Success()
- }
- }
- If (TextFileName = "")
- {
- If !(HeaderName = "")
- {
- FileAppend("--------------------------------------------------------------------------------`n" HeaderName "`n`n" A_Clipboard "`n", "Clipboard Stash.txt")
- F_Success()
- }
- }
- If !(TextFileName = "")
- {
- If (HeaderName = "")
- {
- FileAppend("--------------------------------------------------------------------------------`n`n" A_Clipboard "`n", TextFileName ".txt")
- F_Success()
- }
- }
- If (TextFileName = "")
- {
- If (HeaderName = "")
- {
- FileAppend("--------------------------------------------------------------------------------`n`n" A_Clipboard "`n", "Clipboard Stash.txt")
- F_Success()
- }
- }
- }
- }
- F_Success()
- {
- ToolTip "Success"
- Sleep 1200
- ToolTip ""
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement