to open print dialogbox.

Hello.
In a webbrowser (activeX).
I don't arrive has to open the print dialogbox. I have tested plusior scripts for a few weeks, but I don't see any more what making.
I use execwb
maybe:
DesktopX.ScriptObject("wiki_Browser").Control.ExecWB ....
or
document.Control.ExecWB .....

I cannot any more what test.

thank you.
7,899 views 9 replies
Reply #1 Top
*bump*

Anybody know how to open the print dialog?


Reply #2 Top
VBscript:

Sub RunScript
    Window.Print()
End Sub

Reply #3 Top
  

Reply #4 Top
thank you .
I tested that the next week, but how to put it in a button
I would see that tomorrow.
bye.
Reply #5 Top
What are you trying to do?
What are you trying to print?
You want a button on one part af a DX app that prints the contents of another?
Reply #6 Top
In a webbrowser


Reply #7 Top
A webbrowser is one DX object
A print button might be another (probably is).

I like clarity though.
Reply #8 Top
You can:

1. RIGHT-CLICK in the web page and select "PRINT"
2. CLICK on the web page and press CTRL+P to get a print dialog.

as for WITH DX, Im not sure, would have to do a google search for someone else' code.
Reply #9 Top
thank you again.

I'm happy, I find.

'Called when the script is executed
Sub Object_OnScriptEnter

End Sub

Sub Object_OnStateChange(state)
If state = "Mouse up" Then
On Error Resume Next
DesktopX.ScriptObject("wiki_Browser").Control.ExecWB 6,6 (or 6,2 for directly print)
End If
End Sub

'Called when the script is terminated
Sub Object_OnScriptExit

End Sub


thank you all

good bye.