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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing Extra's Print Commands

Status
Not open for further replies.

steveycarr

Technical User
Apr 23, 2003
132
GB
I've been developing VB apps to scrape host data from Extra, does anyone know how to get at Extra's print commands, normally I can send any key combinations, however I'm struggling to send a ctrl-P...any ideas would be gratefully accepted,
Thanx in advance
 
check the post about sending Pf7.

Ends up the documentation says it should be .sendkeys("^p"), but my version (6.7) sends that string to the screen. I don't know of a work around for this one.
 
I used this from a previous posting and it works awesome!

Dim rc%
Dim MaxColumn%
Dim row%
Dim MaxRows%
Dim filenum%
Dim Screenbuf$
Dim linebuf$
Dim FileName$

' Get the necessary Session Object
Dim Sess0 As Object
Set Sess0 = System.ActiveSession
If (Sess0 is Nothing) Then
Msgbox "Could not create the Session object. Stopping macro playback."
STOP
End If
If Not Sess0.Visible Then Sess0.Visible = TRUE
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

FileIn=FreeFile
'Takes a "snapshot" of current screen and stores it in variable Screenbuf$
MaxRows%=Sess0.Screen.Rows()
MaxColumns%=Sess0.Screen.Cols()
Screenbuf$=""
linebuf$=Space$(MaxColumns%)
For row%=1 to MaxRows%
linebuf$=Sess0.Screen.Area(row%,1,row%,MaxColumns%,xBlock)
Screenbuf$=Screenbuf$+linebuf$+Chr$(13)+Chr$(10)
Next
filenum%=Freefile
FileName$="\\BDCTAPE\HP_Eastwing" 'name of your network printer
Open FileName$ For Output as filenum%
Print # filenum%,screenbuf$; chr$(12) 'this actually sends the screen print to the printer
Close filenum%
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top