Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Clipboard saver (AutoHotkey).  (Read 5983 times)

0 Members and 1 Guest are viewing this topic.

zask

    Topic Starter


    Intermediate

    • Experience: Experienced
    • OS: Other
    Clipboard saver (AutoHotkey).
    « on: April 27, 2019, 11:28:44 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 12 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.

    zask

      Topic Starter


      Intermediate

      • Experience: Experienced
      • OS: Other
      Re: Clipboard saver (AutoHotkey).
      « Reply #1 on: April 29, 2019, 07:15:14 PM »
      That's weird I don't remember posting this in this topic.