Sign in to follow this  
Followers 0
jvanegmond

FilePrint func

11 posts in this topic




Sweet :-)

i save this :-) you never know it might be handy (sorry i dont know how to write might)

i think it wil be fun @ school.. using a while loop , uhm shit i did not say that !

Share this post


Link to post
Share on other sites

In that case, have fun with my new PrintString function.

Here's an example of how you might spam your school.

For $x = 0 to 60
    PrintString("AutoIt is the bomb. AutoIt is the bomb. AutoIt is the bomb. ")
Next

Func PrintString($String,$PrintPort='LPT1')
    RunWait(@ComSpec & ' /c ECHO '&$String&' > '&$PrintPort,'',@SW_HIDE)
EndFunc

Share this post


Link to post
Share on other sites

How do you use this with a network printer and is there a way to find out how many and what printers there are?

Thanks


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

Try a printing API with DllCall. I'm thinking I may write a dll for printing without an external application. It's just another item on my list.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

what about this version ? works when there is a Print option available for a file Extension:

Func _FilePrintCom($iFile)
    If Not FileExists($iFile) Then Return SetError(1,0,0)
    $objShellApp = ObjCreate("Shell.Application")
    $objShellApp.ShellExecute($iFile,0,0,"PRINT",0)
EndFunc
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

what about this version ? works when there is a Print option available for a file Extension:

Func _FilePrintCom($iFile)
    If Not FileExists($iFile) Then Return SetError(1,0,0)
    $objShellApp = ObjCreate("Shell.Application")
    $objShellApp.ShellExecute($iFile,0,0,"PRINT",0)
EndFunc
for a picture it opened it with the windows picture viewer, for a TXT it printed to the default.

thanks, but I wanted to be able find avalible printer???


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

for a picture it opened it with the windows picture viewer, for a TXT it printed to the default.

thanks, but I wanted to be able find avalible printer???

This is indeed printing to the default priner...

There are other COM functions to select any of your installed printers....


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

What about _FilePrint in the file.au3 include?

The first string i wrote in this topic was "Just another way of printing." what do you think i was referring to? I think this is faster though, but it has poor support.

Edit: If you weren't replying to me, then i am ever so sorry and I offer you my sincere apologies.

Edited by Manadar

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

How do you use this with a network printer and is there a way to find out how many and what printers there are?

Thanks

For networks printers use the full path as parameter for printport:

\\pcname\printer1\

I have no idea how to figure what printers there are, this was just a quick thought and i wanted to write it down. :D

Edited by Manadar

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0