Jump to content
Sign in to follow this  
searchresult

Printing eror

Recommended Posts

searchresult

When I run this script below often happens that it will print it twice or more times and don't know what is wrong.

Case $Button1

$print = _FilePrint("Print.txt")

$line = GUICtrlRead($List1)

$file = FileOpen("Print.txt", 1)

FileWrite("Print.txt", "Bijeli Delfin d.o.o."& @Crlf)

FileWrite("Print.txt", "Adresa lokala"&@Crlf)

FileWrite("Print.txt", "Broj računa: ")

_DateTimeSplit($vrijeme,$MyDate,$MyTime)

For $x = 1 to $MyDate[0]

FileWrite("Print.txt",$MyDate[$x])

Next

For $x = 1 to $MyTime[0]

FileWrite("Print.txt",$MyTime[$x])

Next

FileWrite("Print.txt", @crlf &@crlf)

FileWrite($file, $Line)

$print = _FilePrint("Print.txt")

If $print Then

MsgBox(64, "Račun", "Račun je ispisan.")

Else

MsgBox(48, "Račun", "Greka: " & @error & @CRLF & "Račun nije ispisan.")

EndIf

FileClose(FileOpen("E:\sustav naplate\forma\Print.txt", 2))

Share this post


Link to post
Share on other sites
PsaltyDS

I don't see why it wouldn't print twice: You print the file on line 4 of the above code, then write some stuff to the file, then print it again on line 21. Why wouldn't it print twice? Maybe line 4 should be commented out?

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
searchresult

I don't see why it wouldn't print twice: You print the file on line 4 of the above code, then write some stuff to the file, then print it again on line 21. Why wouldn't it print twice? Maybe line 4 should be commented out?

:)

I have seen the error what I have made... Thanks for pointing it out.

Please delete this topic...

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  

×