Results 1 to 9 of 9

Thread: print screen to printer

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    3

    print screen to printer

    Dear all,

    I would like to print screen to my pinter, could anyone help me to solve this in my marco....

    [PCOMM SCRIPT HEADER]
    LANGUAGE=VBSCRIPT
    DESCRIPTION=[PCOMM SCRIPT SOURCE]
    OPTION EXPLICIT
    autECLSession.SetConnectByName(ThisSessionName)

    REM This line calls the macro subroutine
    subSub1_

    sub subSub1_()
    autECLSession.autECLOIA.WaitForAppAvailable

    autECLSession.autECLOIA.WaitForInputReady
    autECLSession.autECLPS.SendKeys "[pf7]"

    autECLSession.autECLOIS.WaitForAttrib 7,1,"00", "3c",3,10000

    autECLSession.autECLOIS.WaitForCursor 7,2,10000

    autECLSession.autECLOIA.WaitForAppAvailable

    autECLSession.autECLOIA.WaitForInputReady
    autECLSession.autECLOIS.SendKeys "s"
    autECLSession.autECLOIA.WaitForInputReady
    autECLSession.autECLOIS.SendKeys "[enter]"

    ..........how to print screen here ?????


    end sub

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: print screen to printer

    Welcome to the forums.

    What is this macro written in? I do not recognize the syntax.

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: print screen to printer

    "LANGUAGE=VBSCRIPT"

    The simplest way to print the screen is an Int 5, but since VBScript can't execute assembly code, you'd need an .exe or .com file to shell to that has that instruction.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    3

    Re: print screen to printer

    Quote Originally Posted by Hack
    Welcome to the forums.

    What is this macro written in? I do not recognize the syntax.
    That is recorded from AS400. I need to press f7...type "s"...then..enter

    after that i want a screen print to my printer.

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    3

    Re: print screen to printer

    Quote Originally Posted by Al42
    "LANGUAGE=VBSCRIPT"

    The simplest way to print the screen is an Int 5, but since VBScript can't execute assembly code, you'd need an .exe or .com file to shell to that has that instruction.

    thks! AL42.

    how to do the .exe or .com file??? Please help...

  6. #6
    New Member
    Join Date
    Dec 2017
    Posts
    3

    Re: print screen to printer

    autECLSession.autECLOIS.SendKeys "[printps]"

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: print screen to printer

    The thread is ten years old, and the OP hasn't posted anything other than this thread. It's pretty unlikely that they will ever see any such answer.

    Aside from that, it looks like it should be printsc, not printps.
    My usual boring signature: Nothing

  8. #8
    New Member
    Join Date
    Dec 2017
    Posts
    3

    Re: print screen to printer

    Quote Originally Posted by Shaggy Hiker View Post
    The thread is ten years old, and the OP hasn't posted anything other than this thread. It's pretty unlikely that they will ever see any such answer.

    Aside from that, it looks like it should be printsc, not printps.
    hi
    i dont have seen the date, haha

    in my scrypt i have ; pcLPS.SendKeys "[printps]"
    pcOIA.WaitForAppAvailable
    pcOIA.WaitForInputReady

    it seem to work what the difference between both!?!

  9. #9
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,582

    Re: print screen to printer

    I don't think there is a [printsc] Mnemonic for the SendKeys method on the AS400.
    [printps] = Print Presentation Space, which is defined for the AS400, but not in other versions of VBSCRIPT SendKey methods such as for Oracle or Sun (Oracle and Sun may be based on the same implementation of VBSCRIPT).

    I'm thinking that Shaggy Hiker was thinking of {PRTSC} which emulates pressing the Print Screen key on a PC.

    Of course, there are probably even fewer AS400 users now than there was 10 years ago.

Posting Permissions

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



Click Here to Expand Forum to Full Width