Sign in to follow this  
Followers 0
immortalxx

can i save ctr + c into a txt file? or modify it?

4 posts in this topic

I wrote a script which copies txt and pastes it. Now i was wondering if i am able to use the ctr + c (clipboard) or w/e that goes to, to save directly to a txt file, instead of actually opening the txt file then pasting it in there?

Any ideas?

Someone suggested this on a different forum: http://msdn.microsoft.com/en-us/library/ms649039(VS.85).aspx

I do not seem to understand it very well. Not any examples.

Thanks

Share this post


Link to post
Share on other sites



I think you want the built in "Enviornment Managment" functions. Check out ClipGet() and ClipPut ()


There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly

Share this post


Link to post
Share on other sites

I wrote a script which copies txt and pastes it. Now i was wondering if i am able to use the ctr + c (clipboard) or w/e that goes to, to save directly to a txt file, instead of actually opening the txt file then pasting it in there?

Any ideas?

Someone suggested this on a different forum: http://msdn.microsoft.com/en-us/library/ms649039(VS.85).aspx

I do not seem to understand it very well. Not any examples.

Thanks

Try this:

HotKeySet("{ESC}","Quit")
HotKeySet("^c","SaveInFile")

While 1
    Sleep(25)
WEnd

Func SaveInFile()
    HotKeySet("^c")
    Send("^c")
    $FILE = FileOpen("test.txt",1)
    FileWriteLine($FILE,ClipGet())
    FileClose($FILE)
    HotKeySet("^c","SaveInFile")
EndFunc

Func Quit()
    Exit
EndFunc

When the words fail... music speaks

Share this post


Link to post
Share on other sites

thank you very much guys that makes PERFECT sense! :) thank you

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  
Followers 0