Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do u input highlighted data on webpage into a file ! 1

Status
Not open for further replies.

BondGuy

IS-IT--Management
Feb 9, 2005
10
0
0
US
Hi ,

this is the issue -

if i highlight some content on any webpage,and i do a right click,it should be inserted into a specific file.

yeah i could do a copy and paste from webpage into this file,but i was wondering if there is any script that could do it..

i dont even know if perl is what i should be using ..i do use activerperl..

i know javascript cannot do file manipulation like writing to a file?

Guide me ..

bond guy
 
Help me understand..

Do you want to have a script on your web server, and every time a client highlights some content and right click on it, on his browser, to create a file on the clients pc with this content?

Or you want to create a script to be able to run as a service on your pc so every time you highlight some content and right click on it, on your browser, to save it in a file?

TIMTOWTDI
 
Basically, if you are looking at a webpage, you are in the hands of your web browser (IE, Mozilla, Opera, Firefox, whatever), and you have whatever facilities it provides you.

There may be ways of attaching programs or scripts to your mouse button, but I wouldn't bank on it.

Sorry.
 
Response to PerluserPengo.

"you want to create a script to be able to run as a service on your pc so every time you highlight some content and right click on it, on your browser, to save it in a file? "

that is what i am looking for and thanks for wording it so clearly .. it could be a service or could be an option in rightclick menu .. but yeah service would be great too..

thanks
bondguy
 
Office XP's Clipbook should be what you want here, copy clippings into the clipboard, and every so often paste the clipping into a new document or text file.

There are some other clipbook programs available as shareware

--Paul

cigless ...
 
Thanks for the suggest Paul.

But i didnt want to go through the excercise of copying and pasting .. the whole intention is to save time on doing that ...

-- bondguy
 
On the Edit menu, click Office Clipboard
Select your text, CTRL-C, Select Next text CTRL-C .... ad inifinitum

Open Word document, start at the top, and press each clip into the new document

--Paul

cigless ...
 
It is a siple thing to do ( copy & paste),
but if you realy want to do as you said, and you want to do it with perl, then you have to study a couple of modules to understand how this could work.

Win32::Clipboard - Interaction with the Windows clipboard
(for you script to be able to catch the marked text, and place temporarly on win clipboard), and then just open a file and copy the content of the clipboard in this file.

Then you have to find out how can you get the 'click event' of the mouse(to triger your copy-paste), try module Tk and command bind().

and also make this 'foo.pl' of yours act like a service on windows.

Read some of the documentation at CPAN for some of the Win32 modules, and you might find some thing usefull. Like Tk (which has a lot of modules), Win32::Registry, Win32::GUI, and many more more more modules!
or if someone out there, knows any other, it will be appreciated if he/she points it out.

I dont know what kind of OS you have but this link might give you a start point


You can also try the Development Kit of ActiveState but you have to know [red]it is not free[/red]

But remember as complicate as my post is, the same will be with the script you want to build.

Good luck

TIMTOWTDI
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top