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 2379 times)

0 Members and 1 Guest are viewing this topic.

zask

    Topic Starter


    Intermediate

    • Experience: Experienced
    • OS: Other
    Clipboard saver (Autohotkey).
    « 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.

    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: Clipboard saver (Autohotkey).
    « Reply #1 on: April 30, 2019, 04:33:27 AM »
    No need to double Post...

    Topic Closed.
    " Anyone who goes to a psychiatrist should have his head examined. "