Closed Thread
Results 1 to 9 of 9

Thread: printing out into notepad from the html using perl

  1. #1
    lichy is offline Newbie
    Join Date
    Jun 2007
    Posts
    17
    Rep Power
    0

    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?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Jordan Guest
    Just label the file as ".txt". Most Windows computer have this set to open with Notepad. Is this what you mean?

  4. #3
    lichy is offline Newbie
    Join Date
    Jun 2007
    Posts
    17
    Rep Power
    0
    eh... as in the result which the user want can be put into a pop-up notepad.

  5. #4
    KevinADC is offline Programmer
    Join Date
    Jan 2007
    Posts
    125
    Rep Power
    0
    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.

  6. #5
    hoser2001's Avatar
    hoser2001 is offline Programmer
    Join Date
    Jul 2006
    Posts
    175
    Rep Power
    0
    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...

  7. #6
    KevinADC is offline Programmer
    Join Date
    Jan 2007
    Posts
    125
    Rep Power
    0
    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?

  8. #7
    hoser2001's Avatar
    hoser2001 is offline Programmer
    Join Date
    Jul 2006
    Posts
    175
    Rep Power
    0
    im sorry, i misunderstood, disregard.

  9. #8
    jonmacpherson is offline Newbie
    Join Date
    Dec 2007
    Posts
    7
    Rep Power
    0
    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.

  10. #9
    jonmacpherson is offline Newbie
    Join Date
    Dec 2007
    Posts
    7
    Rep Power
    0

    Error in script

    Sorry, Pulled that code from two files, replace '$self' with $wrd.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 03-12-2010, 04:04 AM
  2. Do you write html in notepad?
    By kisna in forum HTML Programming
    Replies: 318
    Last Post: 08-25-2008, 05:54 PM
  3. Notepad++
    By xXHalfSliceXx in forum C and C++
    Replies: 15
    Last Post: 01-29-2007, 09:17 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts