Jump to content

Recommended Posts

Posted

Which code is used for (call .Dll ) to print the current page?

Anybody knows about printing page please :)

  • Developers
Posted

Anybody knows about printing page please :)

Maybe you need to be more explicit in what it is you want to do.......

Do you want to print a capture of the current screen or print a file ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

Maybe you need to be more explicit in what it is you want to do.......

Do you want to print a capture of the current screen or print a file ?

thanks for your reaply first

I have got GUI window and i have got button when the button pressed the page will be print it

code

#include <GUIConstants.au3>

#NoTrayIcon

Global $mnuFile, $mnuEdit, $h_ToolBar, $h_Rebar, $mnuExit, $button, $browser

$Main_GUI = GUICreate("KHM", 1020, 710, 0, 0)

GuiSetIcon(@SystemDir & "\syncapp.exe", 0)

$mnuFile = GUICtrlCreateMenu("&File")

$IDM_PRINT = GUICtrlCreateMenuItem("&Print", $mnuFile)

$IDM_SAVE = GUICtrlCreateMenuItem("Save", $mnuFile)

GUICtrlCreateMenuItem("", $mnuFile, 2) ; create a separator line

$mnuExit = GUICtrlCreateMenuItem("Exit", $mnuFile)

$mnuEdit = GUICtrlCreateMenu("&Edit")

$IDM_CUT = GUICtrlCreateMenuItem("Cut", $mnuEdit)

$IDM_COPY = GUICtrlCreateMenuItem("Copy", $mnuEdit)

$IDM_PASTE = GUICtrlCreateMenuItem("Paste", $mnuEdit)

GUICtrlCreateMenuItem("", $mnuEdit, 3) ; create a separator line

$IDM_UNDO = GUICtrlCreateMenuItem("Undo", $mnuEdit)

$IDM_REDO = GUICtrlCreateMenuItem("Redo", $mnuEdit)

$mnuHelp = GUICtrlCreateMenu("&Help")

$IDM_ABOUT= GUICtrlCreateMenuItem("About", $mnuHelp)

$IDM_HELP = GUICtrlCreateMenuItem("Help", $mnuHelp)

$Button2 = GUICtrlCreateButton("BACK", 10, 7, 40, 40, $BS_ICON)

GUICtrlSetImage (-1, "shell32.dll",146)

GUICtrlSetState( -1, $GUI_HIDE);

$forward = GUICtrlCreateButton("FORWARD", 50, 7, 40, 40, $BS_ICON)

GUICtrlSetImage (-1, "shell32.dll",137)

GUICtrlSetState( -1, $GUI_HIDE);

$Button3 = GUICtrlCreateButton("Print", 100, 7, 40, 40, $BS_ICON)

GUICtrlSetImage (-1, "shell32.dll",136)

GUICtrlSetState( -1, $GUI_HIDE);

GuiCtrlCreateDate("", 450, 20, 180, 20)

$BUTTON = GUICtrlCreateButton ("1", 140,7,40,40,$BS_ICON)

GUICtrlSetImage (-1, "shell32.dll",93)

GUICtrlSetState( -1, $GUI_HIDE);

GuiCtrlCreateAvi("sampleAVI.avi",0, 980, 7, 40, 40, $ACS_AUTOPLAY)

$BotBStart = GUICtrlCreateButton ("1", 230,7,40,40,$BS_ICON)

GUICtrlSetImage (-1, "shell32.dll",27)

GUICtrlSetState( -1, $GUI_HIDE); hide the button

$BotStart = GUICtrlCreateButton("off", 230,7,40,40,$BS_ICON)

GUICtrlSetImage (-1, "shell32.dll",112)

GUISetState()

$browser = GUICreate("", 1000, 600, 10, 60, $WS_CHILD, "", $Main_GUI)

GUISetState()

$dll = DllOpen("cwebpage.dll")

DllCall($dll, "long", "EmbedBrowserObject", "hwnd", $browser)

Opt("TrayOnEventMode",1)

Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown.

$infoitem = TrayCreateItem("Info")

TrayItemSetOnEvent(-1,"ShowInfo")

TrayCreateItem("")

$exititem = TrayCreateItem("Exit")

TrayItemSetOnEvent(-1,"ExitScript")

TraySetState()

While 1

$MSG = GUIGetMsg()

Select

Case $msg = $BotStart

DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $browser, "str", "http://www.autoitscript.com/)

If guictrlgetstate($BotBStart) = 96 Then

GUICtrlSetState($BotBStart, $GUI_SHOW)

Guictrlsetstate($BotStart, $GUI_Hide)

Guictrlsetstate($Button2, $GUI_SHOW)

Guictrlsetstate($Button3, $GUI_SHOW)

Guictrlsetstate($BUTTON, $GUI_SHOW)

Guictrlsetstate($forward, $GUI_SHOW)

EndIf

Case $msg = $BotBStart

DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $browser, "str", "http://www.autoitscript.com")

If guictrlgetstate($BotBStart) = 80 Then

GUICtrlSetState($BotBStart, $GUI_Hide)

Guictrlsetstate($BotStart,$GUI_SHOW)

Guictrlsetstate($Button2, $GUI_Hide)

Guictrlsetstate($Button3, $GUI_Hide)

Guictrlsetstate($BUTTON, $GUI_Hide)

Guictrlsetstate($forward, $GUI_Hide)

EndIf

EndSelect

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $Button2

DLLCall($dll,"none","DoPageAction","hwnd",$browser,"int", 0)

Case $msg = $Button3

Case $msg = $forward

DLLCall($dll,"none","DoPageAction","hwnd",$browser,"int", 1)

Case $msg = $IDM_PRINT

Case $msg = $mnuExit

ExitLoop

Case $msg = $IDM_ABOUT

Msgbox(0,"About","KHM Viersion 0.1" & @CRLF & "Create by R.Norky © 2006" & @CRLF & "Project")

case Else

EndSelect

WEnd

Func _ArraySortByLen (ByRef $nArray, $Start = 1)

For $i = $Start To UBound($nArray) - 2

Local $SE = $i

For $x = $i To UBound($nArray) - 1

If StringLen($nArray[$SE]) < StringLen($nArray[$x]) Then $SE = $x

Next

Local $HLD = $nArray[$i]

$nArray[$i] = $nArray[$SE]

$nArray[$SE] = $HLD

Next

EndFunc ;==>_ArraySortByLen

GUIDelete()

Exit

While 1

Sleep(10) ; Idle loop

WEnd

Exit

Func ShowInfo()

Msgbox(0,"About","KHM Viersion 0.1" & @CRLF & "Create by R.Norky © 2006" & @CRLF & "Project")

EndFunc

Func ExitScript()

Exit

EndFunc

Posted

Am I blind I can't find it or something like that can't be fixed? somebody help please. its part of my project i have to submit it on Monday :):(

Posted

Am I blind I can't find it or something like that can't be fixed? somebody help please. its part of my project i have to submit it on Monday :):(

HI,

i think Button3 is your print button, but you aren#t doing anything after hitting it.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Posted

HI,

i think Button3 is your print button, but you aren#t doing anything after hitting it.

So long,

Mega

Yes That is right. I can't find any threat to call dll to print the current page.

I need your help.

Posted

Yes That is right. I can't find any threat to call dll to print the current page.

I need your help.

This file i atteched below maybe make it more clear.

cwebpage.dll

Posted (edited)

HI,

I dunno much about dll, but maybe this stupid idea helps in any case :)

Send("{PRINTSCREEN}")

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Posted

Am I blind I can't find it or something like that can't be fixed? somebody help please. its part of my project i have to submit it on Monday :D:oops:

Stop! I can't take it when you make those sad puppy eyes!!! :(

All seriousness aside, here is a reformatted version of your code:

CODE

#include <GUIConstants.au3>

#NoTrayIcon

Global $mnuFile, $mnuEdit, $h_ToolBar, $h_Rebar, $mnuExit, $button, $browser

$Main_GUI = GUICreate("KHM", 1020, 710, 0, 0)

GUISetIcon(@SystemDir & "\syncapp.exe", 0)

$mnuFile = GUICtrlCreateMenu("&File")

$IDM_PRINT = GUICtrlCreateMenuitem("&Print", $mnuFile)

$IDM_SAVE = GUICtrlCreateMenuitem("Save", $mnuFile)

GUICtrlCreateMenuitem("", $mnuFile, 2) ; create a separator line

$mnuExit = GUICtrlCreateMenuitem("Exit", $mnuFile)

$mnuEdit = GUICtrlCreateMenu("&Edit")

$IDM_CUT = GUICtrlCreateMenuitem("Cut", $mnuEdit)

$IDM_COPY = GUICtrlCreateMenuitem("Copy", $mnuEdit)

$IDM_PASTE = GUICtrlCreateMenuitem("Paste", $mnuEdit)

GUICtrlCreateMenuitem("", $mnuEdit, 3) ; create a separator line

$IDM_UNDO = GUICtrlCreateMenuitem("Undo", $mnuEdit)

$IDM_REDO = GUICtrlCreateMenuitem("Redo", $mnuEdit)

$mnuHelp = GUICtrlCreateMenu("&Help")

$IDM_ABOUT = GUICtrlCreateMenuitem("About", $mnuHelp)

$IDM_HELP = GUICtrlCreateMenuitem("Help", $mnuHelp)

$Button2 = GUICtrlCreateButton("BACK", 10, 7, 40, 40, $BS_ICON)

GUICtrlSetImage(-1, "shell32.dll", 146)

GUICtrlSetState(-1, $GUI_HIDE);

$forward = GUICtrlCreateButton("FORWARD", 50, 7, 40, 40, $BS_ICON)

GUICtrlSetImage(-1, "shell32.dll", 137)

GUICtrlSetState(-1, $GUI_HIDE);

$Button3 = GUICtrlCreateButton("Print", 100, 7, 40, 40, $BS_ICON)

GUICtrlSetImage(-1, "shell32.dll", 136)

GUICtrlSetState(-1, $GUI_HIDE);

GUICtrlCreateDate("", 450, 20, 180, 20)

$button = GUICtrlCreateButton("1", 140, 7, 40, 40, $BS_ICON)

GUICtrlSetImage(-1, "shell32.dll", 93)

GUICtrlSetState(-1, $GUI_HIDE);

GUICtrlCreateAvi("sampleAVI.avi", 0, 980, 7, 40, 40, $ACS_AUTOPLAY)

$BotBStart = GUICtrlCreateButton("1", 230, 7, 40, 40, $BS_ICON)

GUICtrlSetImage(-1, "shell32.dll", 27)

GUICtrlSetState(-1, $GUI_HIDE); hide the button

$BotStart = GUICtrlCreateButton("off", 230, 7, 40, 40, $BS_ICON)

GUICtrlSetImage(-1, "shell32.dll", 112)

GUISetState()

$browser = GUICreate("", 1000, 600, 10, 60, $WS_CHILD, "", $Main_GUI)

GUISetState()

$dll = DllOpen("cwebpage.dll")

DllCall($dll, "long", "EmbedBrowserObject", "hwnd", $browser)

Opt("TrayOnEventMode", 1)

Opt("TrayMenuMode", 1) ; Default tray menu items (Script Paused/Exit) will not be shown.

$infoitem = TrayCreateItem ("Info")

TrayItemSetOnEvent (-1, "ShowInfo")

TrayCreateItem ("")

$exititem = TrayCreateItem ("Exit")

TrayItemSetOnEvent (-1, "ExitScript")

TraySetState ()

While 1

$MSG = GUIGetMsg()

Select

Case $MSG = $BotStart

DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $browser, "str", "http://www.autoitscript.com/)

If GUICtrlGetState($BotBStart) = 96 Then

GUICtrlSetState($BotBStart, $GUI_SHOW)

GUICtrlSetState($BotStart, $GUI_HIDE)

GUICtrlSetState($Button2, $GUI_SHOW)

GUICtrlSetState($Button3, $GUI_SHOW)

GUICtrlSetState($button, $GUI_SHOW)

GUICtrlSetState($forward, $GUI_SHOW)

EndIf

Case $MSG = $BotBStart

DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $browser, "str", "http://www.autoitscript.com")

If GUICtrlGetState($BotBStart) = 80 Then

GUICtrlSetState($BotBStart, $GUI_HIDE)

GUICtrlSetState($BotStart, $GUI_SHOW)

GUICtrlSetState($Button2, $GUI_HIDE)

GUICtrlSetState($Button3, $GUI_HIDE)

GUICtrlSetState($button, $GUI_HIDE)

GUICtrlSetState($forward, $GUI_HIDE)

EndIf

EndSelect

Select

Case $MSG = $GUI_EVENT_CLOSE

ExitLoop

Case $MSG = $Button2

DllCall($dll, "none", "DoPageAction", "hwnd", $browser, "int", 0)

Case $MSG = $Button3

Case $MSG = $forward

DllCall($dll, "none", "DoPageAction", "hwnd", $browser, "int", 1)

Case $MSG = $IDM_PRINT

Case $MSG = $mnuExit

ExitLoop

Case $MSG = $IDM_ABOUT

MsgBox(0, "About", "KHM Viersion 0.1" & @CRLF & "Create by R.Norky © 2006" & @CRLF & "Project")

Case Else

EndSelect

WEnd

GUIDelete()

Exit

While 1

Sleep(10) ; Idle loop

WEnd

; End of main sequence

Exit

; ------------------------------------------------------------------

; Local Functions

; ------------------------------------------------------------------

Func _ArraySortByLen(ByRef $nArray, $Start = 1)

For $i = $Start To UBound($nArray) - 2

Local $SE = $i

For $x = $i To UBound($nArray) - 1

If StringLen($nArray[$SE]) < StringLen($nArray[$x]) Then $SE = $x

Next

Local $HLD = $nArray[$i]

$nArray[$i] = $nArray[$SE]

$nArray[$SE] = $HLD

Next

EndFunc ;==>_ArraySortByLen

Func ShowInfo()

MsgBox(0, "About", "KHM Viersion 0.1" & @CRLF & "Create by R.Norky © 2006" & @CRLF & "Project")

EndFunc ;==>ShowInfo

Func ExitScript()

Exit

EndFunc ;==>ExitScript

You had the following main sequence code mixed in with your functions:

GUIDelete()
Exit

While 1
    Sleep(10); Idle loop
WEnd

Exit

Your print button case ($Button3), has no code in it at all, so we don't know what's up. Did you look at _FilePrint()? From the help file:

Prints a plain text file.

#include <File.au3>

_FilePrint ( $s_File [, $i_Show])

Parameters

$s_File The file to print.

$i_Show The state of the window. (default = @SW_HIDE)

Return Value

Success: Returns 1.

Failure: Returns 0 and sets @error according to the global constants list.

Remarks

Uses the ShellExecute function of shell32.dll.

You'll have to explain more fully what you want for more specific help. :)
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

Stop! I can't take it when you make those sad puppy eyes!!! :(

All seriousness aside, here is a reformatted version of your code:

CODE

#include <GUIConstants.au3>

#NoTrayIcon

Global $mnuFile, $mnuEdit, $h_ToolBar, $h_Rebar, $mnuExit, $button, $browser

$Main_GUI = GUICreate("KHM", 1020, 710, 0, 0)

GUISetIcon(@SystemDir & "\syncapp.exe", 0)

$mnuFile = GUICtrlCreateMenu("&File")

$IDM_PRINT = GUICtrlCreateMenuitem("&Print", $mnuFile)

$IDM_SAVE = GUICtrlCreateMenuitem("Save", $mnuFile)

GUICtrlCreateMenuitem("", $mnuFile, 2) ; create a separator line

$mnuExit = GUICtrlCreateMenuitem("Exit", $mnuFile)

$mnuEdit = GUICtrlCreateMenu("&Edit")

$IDM_CUT = GUICtrlCreateMenuitem("Cut", $mnuEdit)

$IDM_COPY = GUICtrlCreateMenuitem("Copy", $mnuEdit)

$IDM_PASTE = GUICtrlCreateMenuitem("Paste", $mnuEdit)

GUICtrlCreateMenuitem("", $mnuEdit, 3) ; create a separator line

$IDM_UNDO = GUICtrlCreateMenuitem("Undo", $mnuEdit)

$IDM_REDO = GUICtrlCreateMenuitem("Redo", $mnuEdit)

$mnuHelp = GUICtrlCreateMenu("&Help")

$IDM_ABOUT = GUICtrlCreateMenuitem("About", $mnuHelp)

$IDM_HELP = GUICtrlCreateMenuitem("Help", $mnuHelp)

$Button2 = GUICtrlCreateButton("BACK", 10, 7, 40, 40, $BS_ICON)

GUICtrlSetImage(-1, "shell32.dll", 146)

GUICtrlSetState(-1, $GUI_HIDE);

$forward = GUICtrlCreateButton("FORWARD", 50, 7, 40, 40, $BS_ICON)

GUICtrlSetImage(-1, "shell32.dll", 137)

GUICtrlSetState(-1, $GUI_HIDE);

$Button3 = GUICtrlCreateButton("Print", 100, 7, 40, 40, $BS_ICON)

GUICtrlSetImage(-1, "shell32.dll", 136)

GUICtrlSetState(-1, $GUI_HIDE);

GUICtrlCreateDate("", 450, 20, 180, 20)

$button = GUICtrlCreateButton("1", 140, 7, 40, 40, $BS_ICON)

GUICtrlSetImage(-1, "shell32.dll", 93)

GUICtrlSetState(-1, $GUI_HIDE);

GUICtrlCreateAvi("sampleAVI.avi", 0, 980, 7, 40, 40, $ACS_AUTOPLAY)

$BotBStart = GUICtrlCreateButton("1", 230, 7, 40, 40, $BS_ICON)

GUICtrlSetImage(-1, "shell32.dll", 27)

GUICtrlSetState(-1, $GUI_HIDE); hide the button

$BotStart = GUICtrlCreateButton("off", 230, 7, 40, 40, $BS_ICON)

GUICtrlSetImage(-1, "shell32.dll", 112)

GUISetState()

$browser = GUICreate("", 1000, 600, 10, 60, $WS_CHILD, "", $Main_GUI)

GUISetState()

$dll = DllOpen("cwebpage.dll")

DllCall($dll, "long", "EmbedBrowserObject", "hwnd", $browser)

Opt("TrayOnEventMode", 1)

Opt("TrayMenuMode", 1) ; Default tray menu items (Script Paused/Exit) will not be shown.

$infoitem = TrayCreateItem ("Info")

TrayItemSetOnEvent (-1, "ShowInfo")

TrayCreateItem ("")

$exititem = TrayCreateItem ("Exit")

TrayItemSetOnEvent (-1, "ExitScript")

TraySetState ()

While 1

$MSG = GUIGetMsg()

Select

Case $MSG = $BotStart

DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $browser, "str", "http://www.autoitscript.com/)

If GUICtrlGetState($BotBStart) = 96 Then

GUICtrlSetState($BotBStart, $GUI_SHOW)

GUICtrlSetState($BotStart, $GUI_HIDE)

GUICtrlSetState($Button2, $GUI_SHOW)

GUICtrlSetState($Button3, $GUI_SHOW)

GUICtrlSetState($button, $GUI_SHOW)

GUICtrlSetState($forward, $GUI_SHOW)

EndIf

Case $MSG = $BotBStart

DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $browser, "str", "http://www.autoitscript.com")

If GUICtrlGetState($BotBStart) = 80 Then

GUICtrlSetState($BotBStart, $GUI_HIDE)

GUICtrlSetState($BotStart, $GUI_SHOW)

GUICtrlSetState($Button2, $GUI_HIDE)

GUICtrlSetState($Button3, $GUI_HIDE)

GUICtrlSetState($button, $GUI_HIDE)

GUICtrlSetState($forward, $GUI_HIDE)

EndIf

EndSelect

Select

Case $MSG = $GUI_EVENT_CLOSE

ExitLoop

Case $MSG = $Button2

DllCall($dll, "none", "DoPageAction", "hwnd", $browser, "int", 0)

Case $MSG = $Button3

Case $MSG = $forward

DllCall($dll, "none", "DoPageAction", "hwnd", $browser, "int", 1)

Case $MSG = $IDM_PRINT

Case $MSG = $mnuExit

ExitLoop

Case $MSG = $IDM_ABOUT

MsgBox(0, "About", "KHM Viersion 0.1" & @CRLF & "Create by R.Norky © 2006" & @CRLF & "Project")

Case Else

EndSelect

WEnd

GUIDelete()

Exit

While 1

Sleep(10) ; Idle loop

WEnd

; End of main sequence

Exit

; ------------------------------------------------------------------

; Local Functions

; ------------------------------------------------------------------

Func _ArraySortByLen(ByRef $nArray, $Start = 1)

For $i = $Start To UBound($nArray) - 2

Local $SE = $i

For $x = $i To UBound($nArray) - 1

If StringLen($nArray[$SE]) < StringLen($nArray[$x]) Then $SE = $x

Next

Local $HLD = $nArray[$i]

$nArray[$i] = $nArray[$SE]

$nArray[$SE] = $HLD

Next

EndFunc ;==>_ArraySortByLen

Func ShowInfo()

MsgBox(0, "About", "KHM Viersion 0.1" & @CRLF & "Create by R.Norky © 2006" & @CRLF & "Project")

EndFunc ;==>ShowInfo

Func ExitScript()

Exit

EndFunc ;==>ExitScript

You had the following main sequence code mixed in with your functions:

GUIDelete()
Exit

While 1
    Sleep(10); Idle loop
WEnd

Exit

Your print button case ($Button3), has no code in it at all, so we don't know what's up. Did you look at _FilePrint()? From the help file:

You'll have to explain more fully what you want for more specific help. :)

I just want when the button3 pressed page will going to print.
Posted

I just want when the button3 pressed page will going to print.

HI,

did you try Send("{PRINTSCREEN}") ?

Although it is not a ddl call it should work. :)

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Posted (edited)

I just want when the button3 pressed page will going to print.

Have you tried putting '#include <file.au3> at the top, and _FilePrint() (with appropriate parameters) under the CASE for $Button3?

If so, and it didn't work, please post the modified code and tell us what happened... :)

P.S. th.meger is giving you a good way to print the graphical representation of the screen, and my way prints a file... what is it you want to do?

P.P.S You've also got a print in your menu list at $IDM_PRINT, but again no code under the CASE for it...

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

Have you tried putting '#include <file.au3> at the top, and _FilePrint() (with appropriate parameters) under the CASE for $Button3?

If so, and it didn't work, please post the modified code and tell us what happened... :)

P.S. th.meger is giving you a good way to print the graphical representation of the screen, and my way prints a file... what is it you want to do?

Do I have to put

$s_File The file to print.

$i_Show The state of the window. (default = @SW_HIDE)

below the button3?

Posted

Do I have to put

$s_File The file to print.

$i_Show The state of the window. (default = @SW_HIDE)

below the button3?

I have tried

Send("{PRINTSCREEN}")

it dosen't work

Posted

are you able to save the html file ??

if you are you can use it like this

:)

$HTMLFile=c:\test\test.html
$runDll=@ComSpec &" /C" &" Rundll32.exe MSHTML.dll,PrintHTML "
Run ($runDll&" "&$HTMLfile,"",@SW_hide)
Posted

Do I have to put

$s_File The file to print.

$i_Show The state of the window. (default = @SW_HIDE)

below the button3?

That's a pretty complicated GUI you've got there, for not knowing how to read parameters in the help file! :)

Here is a demo of the _FilePrint() function. The $s_File and $i_Show parameters are what you provide inside the paraens ( ) of the _FilePrint function:

#include <file.au3>
$FileToPrint = @ScriptDir & "\MyFileToPrint.txt"
_FileWriteLog($FileToPrint, "This is my test file to print!")
_FilePrint($FileToPrint, @SW_SHOW)
MsgBox(64, "_FilePrint() Test...", "Check it out, printing completed on your default printer!", 10)

You can change $FileToPrint to however you want to specify the file that needs printing, and you can change @SW_SHOW to @SW_MINIMIZE or @SW_HIDE as required to not display the printing window.

:(

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

are you able to save the html file ??

if you are you can use it like this

:)

$HTMLFile=c:\test\test.html
$runDll=@ComSpec &" /C" &" Rundll32.exe MSHTML.dll,PrintHTML "
Run ($runDll&" "&$HTMLfile,"",@SW_hide)
when i use

DLLCall($dll,"none","DoPageAction","hwnd",$browser,"int", 0) // back

DLLCall($dll,"none","DoPageAction","hwnd",$browser,"int", 1) //forword

its working fine as you know

is that possible DLLCall to printing the page inside that window?

Posted

Does anyone know where that website is, that I think had all the commands and paremeters for cwebpage.dll ? I'm pretty sure there was a site like this, or I got it from soneone on here but can't find it. And also, does cwebpage.dll have printing capabilities. If I'm asking some dumb questions I'm sorry but I was at work till 12 AM lastnight and woke up way too early.

Thanks

FootbaG

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...