Computer Hope

Software => Computer software => Topic started by: zask on April 29, 2019, 07:17:17 PM

Title: Clipboard saver (Autohotkey).
Post by: zask on April 29, 2019, 07:17:17 PM
I was writing a blog today on forms and web page had to reload,   lost everything I had, I had the it copied just to be safe, but I also had a different tab open and was looking for quotes, I had copied and pasted the quote not realizing I lost everything I typed. really made me frustrated. anyways I made this to save what I copy into a notepad. but it has some issues.

Code: [Select]
#SingleInstance ; runs in single instance.
#Persistent ; Works with exitapp.

MsgBox,, Save clipboard data., This software grabs copied text from the clipboard and saves it in a text file, press the (F12) key to close the program at any time. Press OK and enter the folder location and file name for the stored text document.
FileSelectFile, File , Options, RootDir\Example.txt, Prompt, Filter

Loop
{

ClipSaved := ClipboardAll ; Grabs clipboard text.
sleep, 5
Fileappend,%ClipboardAll%,%File% ; Sends it to a text file.
sleep, 5
 
If GetKeyState("F12") ; Searches if F12 has been pressed then closes the program.
      exitapp ; Exits program.
}

It doesn't save copied text until I hit the F12 and it closes, I want to have an infinite loop that will send everything I copy
into the same text file before it closes, I also believe it has problems sending the clipboard text in the same text file that already previously had text stored in it. Thanks.
Title: Re: Clipboard saver (Autohotkey).
Post by: patio on April 30, 2019, 04:33:27 AM
No need to double Post...

Topic Closed.