Jump to content
Sign in to follow this  
Draygoes

Auto Write Notes From Clipboard

Recommended Posts

Draygoes

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.
  • Like 1

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.

 

 

Share this post


Link to post
Share on other sites
JLogan3o13

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

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.