Jump to content

Auto Write Notes From Clipboard


Draygoes
 Share

Recommended Posts

Hi all.
I just wrote this quick script to aid me in copy and pasting information to a text file. No need to copy/switch windows/paste/switch window with this.

I know that this is small, but I remember small scripts like this one being worth gold to me when I was just starting out. And besides that, if anyone ever finds themselves in need of this, you wont have to write it yourself. :muttley:

The Usage

Quote


String One String Two

 

Quote


String Three String Four

 


Lets say that you need to copy "String One" and String Four, the paste them to text file and save that text file. Run this script, and just copy one then the other. The script takes care of the rest.
 

 

While 1
$s1Clip = ClipGet()

Do
Sleep( 100 )
$s2Clip = ClipGet()
Until Not StringCompare($s1Clip, $s2Clip) = 0

FileWriteLine( "list.txt", $s2Clip )
ClipPut( "" )
WEnd


Func Leave()
    Exit
EndFunc

 

Edited by Draygoes
Half the BB code broke on me. Guess I am rusty.
Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 
Link to comment
Share on other sites

  • Moderators

As an FYI we do have a snippets section dedicated to "small, reusable bits of code"

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...