jounipyh Posted August 25, 2016 Share Posted August 25, 2016 hi, I'm new to AutoIt and would like to know how can i print text from a variable to default printer so that user does not need ack the printing? Test code below. I want to print the $print text that is currently shown on msgbox Thanks for the help! $cg = "25.4%" $zfw = "54256 kg" $cargo = "1025 kg" $passangers = "109" $fuel = "1200 kg" $total = "56456 kg" $print = "Passangers:" & @TAB & $passangers & @CRLF & "Cargo:" & @TAB & @TAB & $cargo & @CRLF & "ZFW:" & @TAB & @TAB & $zfw & @CRLF & "Fuel:" & @TAB & @TAB & $fuel & @CRLF & "Total:" & @TAB & @TAB & $total& @CRLF & "CG:" & @TAB & @TAB & $cg msgbox(1, "Weight info", $print ) Br, Jouni Link to comment Share on other sites More sharing options...
jguinch Posted August 25, 2016 Share Posted August 25, 2016 (edited) Write the text into a file and the print the file (using _FilePrint) ... or try it : Edited August 25, 2016 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
jounipyh Posted August 25, 2016 Author Share Posted August 25, 2016 I tested fileprinting and it works but unfortunately it prints also the filename to first line to paper and I don't want that. Need to check that UDF how it works, thanks for suggestion! Link to comment Share on other sites More sharing options...
jounipyh Posted August 25, 2016 Author Share Posted August 25, 2016 Actually it was easy fix for the file print. Just needed to open notepad and remove the header from the layout. Link to comment Share on other sites More sharing options...
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