AutoHotkey Community

It is currently May 27th, 2012, 12:49 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: June 19th, 2011, 6:30 pm 
Offline

Joined: June 19th, 2011, 6:25 pm
Posts: 2
Hey I'm new to this and kind of stuck, I'm trying to make a script that appends the clipboard on change to a text file.

I'm doing it with this:

Code:
OnClipboardChange:
FileAppend, %clipboard%, C:\Documents and Settings\username\Desktop\dump.txt
return


Now it works the first time it is run, placing the clipboard in the text file. But when the clipboard is changed it doesn't work and I'm at a loss for why. When I read the help page on "onclipboardchange" it seems like it should be appending whenever I change the clipboard, but it isn't.

And kind of unrelated but I haven't figured it out, how do you just print characters/start a new line? Ideally I'd want after it prints the new clipboard to put on a new line "-----------" and then put the next clipboard after that as a means of separating the clipboards for easier reading.

Thanks for the help.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2011, 6:37 pm 
Offline

Joined: June 6th, 2006, 3:19 pm
Posts: 1654
Location: Denmark
Code:
#Persistent

OnClipboardChange:
FileAppend, -----`n%clipboard%`n`n, C:\Documents and Settings\username\Desktop\dump.txt
return

_________________
RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2011, 6:44 pm 
Offline

Joined: June 19th, 2011, 6:25 pm
Posts: 2
tonne wrote:
Code:
#Persistent

OnClipboardChange:
FileAppend, -----`n%clipboard%`n`n, C:\Documents and Settings\username\Desktop\dump.txt
return


Thanks that does exactly what I want. When I was messing around with #persistent I couldn't get it to work for whatever reason.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: chaosad, jrav, MSN [Bot] and 19 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group