AutoHotkey Community

It is currently May 26th, 2012, 11:48 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Copy to New File
PostPosted: November 11th, 2009, 2:30 am 
Offline

Joined: August 15th, 2009, 7:20 am
Posts: 308
Hello this should be simple but I can't work out where to start. When I press ctrl+c I want to copy the text selected to a completely new file.

GP


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2009, 2:57 am 
Offline

Joined: August 15th, 2009, 7:20 am
Posts: 308
FileAppend works!
Code:
   FileAppend, %Clipboard%, C:\temp.txt


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Copy to New File
PostPosted: November 11th, 2009, 6:25 am 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Puzzled Greatly wrote:
When I press ctrl+c I want to copy the text selected to a completely new file.


Code:
#Persistent
SetWorkingDir, %A_ScriptDir%
Return

OnClipboardChange:
If ( A_EventInfo = 1 ) {
     FileAppend, %Clipboard%, % ( Saved := A_Now ".txt" )
     SoundBeep
}
Return

^F2::Run, Notepad.exe %Saved%


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2009, 2:39 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
if skan's post isn't obvious, Ctrl F2 will open the most recently saved file.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], hyper_, Leef_me, Pulover, rbrtryn, XstatyK and 22 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