Searching \ for '[OT] copy to file utility' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=copy+file+utility
Search entire site for: 'copy to file utility'.

Exact match. Not showing close matches.
PICList Thread
'[OT] copy to file utility'
2009\02\18@161119 by Luis.Moreira

picon face
Hi Guys,
I am reading a PDF book and I need to copy some parts of it as I go
along as notes to a word file. I am doing this by copying it to the
clipboard with copy and them past into the word document.
What I would like to do is to cut the middle man, I would like an
utility that I would select the text to copy but then it would copy it
strait into the word document.
To be clear, I do not want a pdf converter, I want something that will
grab the selected text strait into the word document.
any suggestions welcomed.
Best Regards
               Luis  



2009\02\18@165840 by gavin-egan.com

flavicon
face

Guess you are running windows,

So essentially you want to be able to highlight text and say press F5 on the
keyboard or similar.
A script or program, copies the text to memory
Chooses the process for Word and brings it to the forefront
Pastes the text and a new line (or even bullet points it)
Then chooses the process for PDF viewer brings that to the forefront and
then
Leaves you where you were.

Sounds fairly straight forward

However, this can be done in matter of keystrokes if you have both an open
blank word doc up and the pdf reader.

Simply Highlight text required.
CTRL C to copy
ALT TAB to move to word
CTRl V to paste
Enter for new line
ALT TAB back to pdf reader

Once you get the hang of a macro like that - its easy. Im sure I could write
something to do it, but there are probably macro/script progs that would
record your efforts.


{Original Message removed}

2009\02\18@171034 by Bob Blick

face
flavicon
face

On Wed, 18 Feb 2009 21:10:36 -0000, "Luis Moreira" <spam_OUTLuis.MoreiraTakeThisOuTspamjet.uk>
said:
> Hi Guys,
> I am reading a PDF book and I need to copy some parts of it as I go
> along as notes to a word file. I am doing this by copying it to the
> clipboard with copy and them past into the word document.
> What I would like to do is to cut the middle man, I would like an
> utility that I would select the text to copy but then it would copy it
> strait into the word document.
> To be clear, I do not want a pdf converter, I want something that will
> grab the selected text strait into the word document.
> any suggestions welcomed.


I bet "autoit" would do it.

Cheers,

Bob

--
http://www.fastmail.fm - IMAP accessible web-mail

2009\02\18@171507 by Tamas Rudnai

face picon face
On Wed, Feb 18, 2009 at 10:07 PM, gavin-egan.com <.....chrisKILLspamspam@spam@gavin-egan.com>wrote:

> Once you get the hang of a macro like that - its easy. Im sure I could
> write
> something to do it, but there are probably macro/script progs that would
> record your efforts.
>

With AutoIt it should be able to be done just like that. You can record it
as a macro, so you do not really have to learn the scripting language, then
you can save it either as a script or an individual windows executable...

Tamas

--
Rudonix DoubleSaver
http://www.rudonix.com

2009\02\18@203459 by Tony Smith

flavicon
face
> Hi Guys,
> I am reading a PDF book and I need to copy some parts of it as I go
> along as notes to a word file. I am doing this by copying it to the
> clipboard with copy and them past into the word document.
> What I would like to do is to cut the middle man, I would like an
> utility that I would select the text to copy but then it would copy it
> strait into the word document.
> To be clear, I do not want a pdf converter, I want something that will
> grab the selected text strait into the word document.
> any suggestions welcomed.
> Best Regards


I've done stuff like this (screen scraping basically) before.

What you can do is write a script (.vbs) that flicks Word open, creates a
new document, and monitors the clipboard.  When the clipboard changes and if
the contents are a certain type, then append it to the end of the doc.  I
think I've got one that runs in Word itself.

If you can wait a day or two, I can dig up something.

I vaguely remember commercial versions of this...

Tony

2009\02\18@224257 by Tony Smith

flavicon
face
> Hi Guys,
> I am reading a PDF book and I need to copy some parts of it as I go
> along as notes to a word file. I am doing this by copying it to the
> clipboard with copy and them past into the word document.
> What I would like to do is to cut the middle man, I would like an
> utility that I would select the text to copy but then it would copy it
> strait into the word document.
> To be clear, I do not want a pdf converter, I want something that will
> grab the selected text strait into the word document.
> any suggestions welcomed.
> Best Regards
>                Luis


Here ya go.

A bit rough around the edges but it works.  It's ready once Word shows up.
One oddity is WSH can't get access to the Clipboard, so it uses IE.

Tony



   'ClipCatcher.vbs
   'Monitors the clipboard, and copies all text to a new Word documents
   'Copy the word STOP to end the script

   'fire up IE with a blank page, hidden instance, wait until it's ready,
clear the clipboard
   Set IE = CreateObject("internetexplorer.application")
   IE.navigate "about:blank"
   Do While IE.readystate <> 4
       wscript.Sleep 50
   Loop
   IE.Document.Parentwindow.Clipboarddata.ClearData "text"
   
   'now a new Word doc
   Set WD = CreateObject("Word.Application")
   WD.Visible = True
   Set Doc = WD.Documents.Add
   Doc.Range.InsertAfter ("Scrape began at " & FormatDateTime(Now,
vbGeneralDate))
   Doc.Range.InsertParagraphAfter
   Doc.Range.InsertParagraphAfter
   Doc.Range.InsertParagraphAfter
   
   
   'round & round we go
   On Error Resume Next
   Do
       
       wscript.Sleep 250
       
       'if this fails, IE has probably vanished for some reason.
       'or you've pasted half a gig into the clipboard and it's respnoding
slowly...
       ReadAttempts = 10
       Do Until ReadAttempts = 0
           wscript.Sleep 100
           Err.Clear
           ClipData =
IE.Document.Parentwindow.Clipboarddata.GetData("text")
           If Err Then
               ReadAttempts = ReadAttempts - 1
               If ReadAttempts = 0 Then
                   Exit Do
               End If
           Else
               Exit Do
           End If
       Loop
       If ReadAttempts = 0 Then
           Exit Do
       End If


       'non-blank string?  paste it & clear the clipboard
       If Len(ClipData) Then
           
           'well, it's not like you have a UI
           If ClipData = "STOP" Then
               Exit Do
           End If
           
           'note that this inserts at the end of the doc, not at the cursor
           'use WD.Selection.InsertBefore() to write at the cursor
           'error means you closed Word for some reason
           Doc.Range.InsertAfter (ClipData)
           If Err Then
               Exit Do
           End If
           Doc.Range.InsertParagraphAfter
           Doc.Range.InsertParagraphAfter
           Doc.Range.InsertParagraphAfter
       
           ClipData = ""
           IE.Document.Parentwindow.Clipboarddata.ClearData "text"
       
       End If

   Loop
   On Error GoTo 0
   
   
   'clean up.  Don't shut Word down
   On Error Resume Next
       IE.Quit
       Set IE = Nothing
       Set Doc = Nothing
       Set WD = Nothing
   On Error GoTo 0


2009\02\19@130551 by Michael Algernon

flavicon
face
On a related note, has any one used an application that captures all  
the text you type during the day and puts it in a file ?  Maybe even  
timestamped ?
I am talking about capturing text input to all applications into one  
text file.  I could use this this for both Windows and Mac.  This is  
not to spy on anyone.  It is to archive stuff I do during the day.
MA



2009\02\19@164325 by Tony Smith

flavicon
face
> On a related note, has any one used an application that captures all
> the text you type during the day and puts it in a file ?  Maybe even
> timestamped ?
> I am talking about capturing text input to all applications into one
> text file.  I could use this this for both Windows and Mac.  This is
> not to spy on anyone.  It is to archive stuff I do during the day.


Hang out at enough warez or porn sites and eventually someone will install
one for you.

There are hardware versions, but they only work on the PS2 port, I can't
recall one for USB.  There are a few DIY designs floating about.

Tony

2009\02\20@063704 by Luis.Moreira

picon face
Hi Guys,
Thank you all for help especially Tony who actually wrote a script for
me, but Autoit is just the ticket. Autoit is actually a very interesting
tool that I have never heard of before, it can do much more than
copy&past, and it is definitely something I will be dedicating a bit of
time in the future.
Thanks to Bob for introducing it to me.
Best Regards
               Luis  


{Original Message removed}

2009\02\21@224049 by Tony Smith

flavicon
face
> Hi Guys,
> Thank you all for help especially Tony who actually wrote a script for
> me, but Autoit is just the ticket. Autoit is actually a very interesting
> tool that I have never heard of before, it can do much more than
> copy&past, and it is definitely something I will be dedicating a bit of
> time in the future.
> Thanks to Bob for introducing it to me.
> Best Regards


Actually, I wrote that script ages ago because AutoIt was a little
unreliable, or rather you had to be careful when using it.  That's true of
any macro type program, they tend to do things a little blindly (although
AutoIt is smarter than most).

For example, what happens if you close down Word, or open another document?
Putting in the safeguards can be a bit tedious.

The script, on the other hand, use COM to control Word, and can't really get
it wrong, like paste into the wrong thing.  If Word shuts down, so does the
script (a msgbox telling you that would be nice!).  I do use AutoIt for
other tasks.

Tony

More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...