Jump to content
Sign in to follow this  

.Bat files are easy but ....

Recommended Posts

Okay so I can make a .bat file and then shellexecute on the batch file passing the paramaters and make it work perfectly.....but....I don't want the dependency of the batch file being there and having to update the batch file if anything changes. How an I execute this through AUTOIT only. I took out a lot of the bat file but left the meat of the issue. I want to capture LPT1 then binary copy a file on top of another file. Then send that file to LPT1.


NET USE LPT1: \\\%tmpspol% || GOTO PRTERR



copy l:\wfx32\%tmpsys%\laser\%2.hp+x:\fx\execute\DINGRID.hp c:\print.fil > nul

copy c:\print.fil lpt1 > nul

erase c:\print.fil > nul

@echo Printing %2



Share this post

Link to post
Share on other sites

Hi Kurto2021,

you can use DriveMapAdd() to map the share to LPT1. Use DriveMapGet to see whether LPT1 is already taken, DriveMapDel to delete an existing mapping.

Use Run or _RunDOS to run the copy commands.


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post

Link to post
Share on other sites

prterr....is just a section in the bat file that tells you the printer you chose is invalid....each printer has a number to run the app you have to pass the parameter of the printer number......that part is irrelevant to the question and I can make it work in Autoit so I took it out to avoid confusion....appears that all I did was create confusion.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...