mIRC Home    About    Download    Register    News    Help

Print Thread
#180041 02/07/07 08:56 PM
Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
hey,

how would i go about printing a file remotely. for example, i have a dialog with a menu, and one menu item is "print", supprized? lol.... anyway the data to be printed is saved in a txt file, ready to go. how would i script printing it? or would it be something like /run notepad.exe /p or something



edit: i searched this forum the the exact words in the subject of this thread, no luck that i could see. smile

Last edited by NightChillz; 02/07/07 08:58 PM.
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
There may be a command line print command. Try searching google for command line print. If one exists, you can simply use mIRC's /run command to execute the print command.

You could also make a feature suggestion for a /print command to be added to mIRC's command list.

-genius_at_work

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Like genius_at_work said, :

//run cmd.exe /k print path\file


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #180053 03/07/07 12:34 AM
Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
i played around with running cmd, but nothing worked, what i did find that seems to work(mind you i dont have a printer so i cant tell for sure, but the printing dialog pops up) is /run notepad /P file

now, by any chance would any know where i can find i list of command line arguments for notepad? i've been searching google and still am, but if anyone knows please let me know. thanks smile

Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
btw, this is what i found when searching for command line printing:


Code:
 Print

Sends a text file to a printer.

Syntax
print [/d:Printer] [Drive:][Path] FileName [ ...]

Top of page
Parameters
/d:Printer : Specifies the printer on which you want to print the job. You can specify a local printer by specifying the port on your computer to which the printer is connected. Valid values for parallel ports are LPT1, LPT2, and LPT3. Valid values for serial ports are COM1, COM2, COM3, and COM4. You can also specify a network printer by its queue name (\\ServerName\ShareName). If you do not specify a printer, the print job is sent to LPT1. 

Drive: : Specifies the logical or physical drive on which the file you want to print is located. This parameter is not required if the file you want to print is located on the current drive. 

Path : Specifies where, on the drive, the file you want to print is located. This parameter is not required if the file you want to print is located in the current directory. 

FileName [...] : Required. Specifies, by name, the file you want to print. You can include multiple files in one command. 

/? : Displays help at the command prompt. 

Examples
To send the file Report.txt in the current directory to a printer connected to LPT2 on the local computer, type: 

print /d:LPT2 report.txt

To send the file Report.txt in the c:\Accounting directory to the Printer1 print queue on the \\CopyRoom server, type: 

print /d:\\copyroom\printer1 c:\accounting\report.txt



mind you, none of this worked for me, and i had people with printers test it, and also someone with a networked printer, nothing.

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
I've tested cmd.exe (window xp) and work fine (event if the cmd.exe window won't be close at the end)
What you pasted here is what cmd.exe help give you when you type "print help" in cmd.exe

You said that you don't have printer smirk so why did you try to print something?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #180059 03/07/07 02:33 AM
Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
i wasnt trying to print something, i am working on an addon, which includes a "print file", just cause i dont have a printer doesnt mean i never will, and doesnt mean anyone that uses addon wont have a printer wink like i said i sent the addon to a couple friends with printers and it didnt work.... i what i pasted didnt come from cmd.exe print help, it came from microsoft.com any time they tried useing the cmd version, it would say "unable to initialize" or something, hard for me to say. but i do know it works with /run notepad /P file

edit: one guy i had test it was on a network, dunno if that made a difference in the results(fail), but for him i gave a special version incorporating the parameters specified for network useage...


still looking for a list of command line arguements for notepad smile

Last edited by NightChillz; 03/07/07 02:40 AM.
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
i don't know why it doesn't work for your friends with cmd.exe but
it work great with /run notepad /P file too, so why did you said "still looking for a list of command line arguements for notepad" ?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #180063 03/07/07 04:09 AM
Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
just curious as to what all the command line arguements are for notepad smile

the more knowledge the better in my books cool


Link Copied to Clipboard