fred666777 Posted July 22, 2010 Share Posted July 22, 2010 expandcollapse popup#include <file.au3> #include <process.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $Here = 0 Global Const $Source = @ScriptDir & "\Invoice.ini" Global Const $EditName = "Edit.txt" Global Const $Any = "*" ;Location Global Const $Find = IniRead($Source, "Location", "Edit", " ") ;Info Global Const $Type = IniRead($Source, "Info", "FileType", " ") Global $FileName = IniRead($Source, "Info", "FileName", "Invoice") Global Const $Sleep = IniRead($Source, "Info", "Sleep", " ") Global Const $MomName = IniRead($Source, "Info", "MomName", " ") Global Const $Overwrite = IniRead($Source, "Info", "Overwrite", " ") ;Print Settings Global Const $CmdPrint = IniRead($Source, "PrintSettings", "Cmd", " ") Global Const $File = IniRead($Source, "PrintSettings", "File", " ") ;Edit Global Const $TextEdit1 = IniRead($Source, "Edit", "Edit1", " ") Global Const $LineEdit1 = IniRead($Source, "Edit", "Line1", " ") Global Const $Overwrite1 = IniRead($Source, "Edit", "Overwrite1", " ") Global Const $FeFind = $Find & "\" While 1 If FileExists($FeFind & $MomName) Then FileAdd1() Edit() Print() FileMove($FeFind & $MomName, $FeFind & $FileName) If FileExists($FeFind & $MomName) Then FileDelete($FeFind & $MomName) EndIf EndIf If $here = 2 Then Exit EndIf Sleep($Sleep) WEnd Func FileAdd1() If $Overwrite = 0 Then $FileName = $FileName + 1 ElseIf $Overwrite = 1 Then $FileName = "INVOICEEL2P" EndIf IniWrite($Source, "Info", "FileName", $FileName) EndFunc ;==>FileAdd1 Func Edit() _FileWriteToLine($FeFind & $MomName, $LineEdit1, $TextEdit1, $Overwrite1) EndFunc ;==>Edit Func Print() _RunDOS($CmdPrint) $here = MsgBox(1, "asdf", "Continue?") EndFunc ;==>Printi made this to take a file that another program makes and fix a line. once you register this OLD software you cannot change what is printed at the top, but i have a few problems i don't know how to fix.this is what i have so far. it works... but when it prints its not bold(like i want it), it prints a blank page(how do i delete the left over blank lines?) and the left margin is a little big(not to worried about it, but would be nice to fix.)any edits to make better would be appreciated too.tanks fred Link to comment Share on other sites More sharing options...
fred666777 Posted July 23, 2010 Author Share Posted July 23, 2010 (edited) i know this is kind of useless w/o the ini. i dont have it right now... if anyone knows how you can choose font size / style before you print a file using print /d:Printer c:\File sourcethat would be great Edited July 23, 2010 by fred666777 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