iceberg Posted February 17, 2005 Posted February 17, 2005 Will this work? If not, why? Pls help. FileCopy("C:\old\*.*", "LPT1") or FileCopy("C:\old\*.*", "LPT1:") thanks. mouse not found....scroll any mouse to continue.
buzz44 Posted February 17, 2005 Posted February 17, 2005 Will this work? If not, why?Pls help.FileCopy("C:\old\*.*", "LPT1")orFileCopy("C:\old\*.*", "LPT1:")thanks.<{POST_SNAPBACK}>dont u need to tell it where to put it.. ie driveegFileCopy("C:\old\*.*", "C:\new\LPT1")windows doesnt allow u to have a colon ":" in a folder name .. only semi-colon qq
Domonoky Posted February 17, 2005 Posted February 17, 2005 Hi.. i think you would like to copy the files to the Printer .. because LPT1 is the Paralellport where usually the printer is. (i have done this often .. in DOS times :-) ) But nowadays often the printer isnt at the Paralellport.. and i dont know if Windows would allow copying to LPT1. I think not. mfg Domonoky
zeroZshadow Posted February 17, 2005 Posted February 17, 2005 you meant you want to print it?? or do you want to put ur file IN the printer memory? *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
CyberSlug Posted February 17, 2005 Posted February 17, 2005 http://www.graphisoft.com/support/archicad...rnpltfiles.html; NOT TESTED BUT MIGHT WORKRun(@Comspec & " /c copy /b filename.prn LPT1", "", @SW_HIDE) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
zeroZshadow Posted February 17, 2005 Posted February 17, 2005 you got to "net use" it first if its an printer in the network *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
iceberg Posted February 18, 2005 Author Posted February 18, 2005 thanks for all the replies. well, using Win XP Pro. wanna copy some templates to the local printer's memory. i can do this via vb script. printer is connected to LPT1. the problem is that both vbs and dos commands are restricted in the policy. I can only execute an exe file. thanks. mouse not found....scroll any mouse to continue.
iceberg Posted January 6, 2006 Author Posted January 6, 2006 hi guys, with the latest beta version, is it possible to copy files to the printer in LPT1 now? thanks. mouse not found....scroll any mouse to continue.
billmez Posted January 6, 2006 Posted January 6, 2006 (edited) hi guys,with the latest beta version, is it possible to copy files to the printer in LPT1 now?thanks.What type of file are you trying to print? If it is a text file why don't you exe notepad with the file and /p parameter to print, I believe you can hide the window in the process.I am not sure of the code since I am relatively new to AutoIt, but I'm sure you can find an example of running notepad hidden and closing it after. The only thought that comes to mind is you may not be able to use WinGetTitle() unless you use mode 2 to match notepad as a partial title.HTHbillmezEdit:WINIO.DLL is the dll file that has LPT functions in it. You can always use DllCall to open LPT1 as a handle and write to it directly. Edited January 6, 2006 by billmez
Gene Posted January 8, 2006 Posted January 8, 2006 http://www.graphisoft.com/support/archicad...rnpltfiles.html; NOT TESTED BUT MIGHT WORKRun(@Comspec & " /c copy /b filename.prn LPT1", "", @SW_HIDE) If you're running WinNT/2K/XP, you should be able to copy it to a shared printer too.Run(@Comspec & " /c copy /b filename.prn \\servername\printersharename", "", @SW_HIDE)The forum turned the server\printersharename into a link, I didn't mean it to be a link.You should also be able to use FileWrite ( filehandle or "filename", "line" ) and FileWriteLine ( filehandle or "filename", "line" ) too.FileWrite ( "\\servername\printersharename", $sValueToBePrinted )FileWrite ( "LPT1:", $sValueToBePrinted )FileWriteLine ( "\\servername\printersharename", $sValueToBePrinted )FileWriteLine ( "LPT1:", $sValueToBePrinted )I haven't tested any of these functions this way, but CyberSlug's method and my first example did work, at least up thru WinNT 4.0.Gene [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...
iceberg Posted January 12, 2006 Author Posted January 12, 2006 hi guys, thanks for the inputs. but i wish to highlight something here. i m not trying to PRINT files...I need to COPY some files. well this is what I exactly wanna do. i wanna copy some TXT and PJL files to a printer's flash memory. so, previously when we were using win9x, we did this using the DOS method. but now we are using winXP and DOS Command Prompt has been restricted for normal users. as such, i need other alternative way to perform the tasks. pls help me. thank you. mouse not found....scroll any mouse to continue.
billmez Posted January 12, 2006 Posted January 12, 2006 hi guys, thanks for the inputs. but i wish to highlight something here. i m not trying to PRINT files...I need to COPY some files. well this is what I exactly wanna do. i wanna copy some TXT and PJL files to a printer's flash memory. so, previously when we were using win9x, we did this using the DOS method. but now we are using winXP and DOS Command Prompt has been restricted for normal users. as such, i need other alternative way to perform the tasks. pls help me. thank you. You stated earlier that you had vbscript that worked. You can convert that to AutoIt. I just converted code to add a new web site to IIS from VBS to AIT, and with the beta, it is not that bad. One area to remember is if the code contains arrays that are returned from windows functions, some of them will start at the [0] index, where in AIT the [0] index is the array count. If you can't do that, maybe if you posted the VBS code, someone here could help you with the convert or propose a way to handle it in AIT. HTH billmez
seandisanti Posted January 12, 2006 Posted January 12, 2006 You stated earlier that you had vbscript that worked. You can convert that to AutoIt. I just converted code to add a new web site to IIS from VBS to AIT, and with the beta, it is not that bad. One area to remember is if the code contains arrays that are returned from windows functions, some of them will start at the [0] index, where in AIT the [0] index is the array count. If you can't do that, maybe if you posted the VBS code, someone here could help you with the convert or propose a way to handle it in AIT. HTH billmezwith xp, isn't there a default spooler service that may be able to be used to the desired end? i'll do some research and see what if i can't find something.
iceberg Posted January 13, 2006 Author Posted January 13, 2006 Hi, thanks for the replies. There is the vbs code which was working previously. But only in Win 98. It didn't work on Win XP. Set fso = CreateObject("Scripting.FileSystemObject") fso.CopyFile "c:\test.txt", "LPT1", True Thanks. mouse not found....scroll any mouse to continue.
iceberg Posted March 31, 2006 Author Posted March 31, 2006 hi guys, any updates on this? pls assist. thanks. mouse not found....scroll any mouse to continue.
iceberg Posted July 13, 2006 Author Posted July 13, 2006 hi again guys, any solution for this now with the new beta version? mouse not found....scroll any mouse to continue.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now