Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > Perl

Perl Discussion for the PERL language - Practical Extraction and Reporting Language, is a programming language often used for creating CGI programs.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-24-2007, 08:57 PM
lichy lichy is offline
Newbie
 
Join Date: Jun 2007
Posts: 17
Rep Power: 4
lichy is on a distinguished road
Default printing out into notepad from the html using perl

hi,

i would like to know, if i did some programming on perl program. and i printed it out in html form. so if user typed into the input which is the textbox in html form, the result will be printed out in a pop-up notepad, ready for printing.

how do i make the pop-up notepad with the result in it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 07-25-2007, 08:51 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Age: 25
Posts: 4,512
Last Blog:
Zend: PHP Security Web...
Rep Power: 50
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

Just label the file as ".txt". Most Windows computer have this set to open with Notepad. Is this what you mean?
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-25-2007, 09:36 PM
lichy lichy is offline
Newbie
 
Join Date: Jun 2007
Posts: 17
Rep Power: 4
lichy is on a distinguished road
Default

eh... as in the result which the user want can be put into a pop-up notepad.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-26-2007, 12:53 AM
KevinADC KevinADC is offline
Learning Programmer
 
Join Date: Jan 2007
Posts: 87
Rep Power: 6
KevinADC is on a distinguished road
Default

Only windows users will have notepad anyway. What you are trying to do is very impractical. Don't try and complicate a simple process: copy and paste. Plus, for all I know, it is not possible anyway.The webserver script can't open a local application, you would have to use an activeX control or maybe javascript.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-31-2007, 03:16 PM
hoser2001's Avatar   
hoser2001 hoser2001 is offline
Programmer
 
Join Date: Jul 2006
Posts: 175
Rep Power: 9
hoser2001 is on a distinguished road
Default

if you need it to print, then just send whatever you need to print to a pop up window, and give it a print button...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 08-01-2007, 04:01 AM
KevinADC KevinADC is offline
Learning Programmer
 
Join Date: Jan 2007
Posts: 87
Rep Power: 6
KevinADC is on a distinguished road
Default

Quote:
Originally Posted by hoser2001 View Post
if you need it to print, then just send whatever you need to print to a pop up window, and give it a print button...
And that will print the output to a notepad (txt) file?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-01-2007, 07:12 AM
hoser2001's Avatar   
hoser2001 hoser2001 is offline
Programmer
 
Join Date: Jul 2006
Posts: 175
Rep Power: 9
hoser2001 is on a distinguished road
Default

im sorry, i misunderstood, disregard.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 12-14-2007, 01:01 PM
jonmacpherson jonmacpherson is offline
Newbie
 
Join Date: Dec 2007
Posts: 7
Rep Power: 0
jonmacpherson is on a distinguished road
Default

use Win32::OLE;
my $wrd = CreateObject Win32::OLE "Word.Application" or die $1;
$wrd->{'Visible'} = 1;

# Lets image that @Array contains the text you want to throw into a word document.

my $ToDoc = $wrd->Documents->Add;
$selection = $wrd->Selection();

foreach $line (@Array){

$self->TypeLine($wrdObj, $selection, $line);

}

$ToDoc->SaveAs($destFile);

$ToDoc->Close();



# You could also do some formatting, auto open the print window, auto print the document etc.... with:
$wrd->Run("Module1.newMacros.PrintIt");
# Note, you must first record the macro.


# That should get you started.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 12-14-2007, 01:06 PM
jonmacpherson jonmacpherson is offline
Newbie
 
Join Date: Dec 2007
Posts: 7
Rep Power: 0
jonmacpherson is on a distinguished road
Default Error in script

Sorry, Pulled that code from two files, replace '$self' with $wrd.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Do you write html in notepad? kisna HTML Programming 227 Today 02:14 PM
About HTML Onur Tutorials, Classes and Code 0 08-28-2007 06:13 PM
HTML Basic Formatting clookid Tutorials, Classes and Code 14 03-06-2007 03:10 PM
HTML Introduction clookid Tutorials, Classes and Code 5 01-08-2007 09:43 PM
What is HTML, DHTML and XHTML? Lop HTML Programming 5 08-09-2006 11:00 AM


All times are GMT -5. The time now is 05:37 PM.

Contest Stats

John ........ 87.50000
dargueta ........ 75.00000
Xav ........ 50.00000
MeTh0Dz ........ 20.00000
gaylo565 ........ 18.00000
Johnnyboy ........ 3.00000

Contest Rules

Ads