[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

10/20/2009 at 06:10AM PDT, ID: 24826704
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.4

IE Hangs after printing receipt

Asked by seldon_26000 in Point of Sale, Printers, Scripting Languages

Tags: OPOS VBScript printer activeX

hi,
I'm developping a web application that is printing a ticket in a receipt POS thermal printer.
I have installed OPOS version 1.8 with OLE OPOS ADK 2.23 and I'm using the activex in my script  to do it.
The script works well on IE 6 but on IE 7 OR 8 it hangs after the ticket finishes printing. So it doesn't release the printer and I have to kill the IE process manually

If I set AsyncMode to false, I have a nice GPF dialog box at the end of the ticket printing mfc42.dll error.

I don't know what I'm missing here, so any help will be welcomed.

thanks
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
<html>
	<head>
<script language="vbscript">
sub print_ticket()
Set OPrinter = CreateObject("OPOS.POSPrinter")
orc = OPrinter.Open ("ThermalS")
crc = OPrinter.Claim(1000)
OPrinter.DeviceEnabled = 1
OPrinter.AsyncMode = true
With OPrinter
	.TransactionPrint 2,11
		.RecLineChars = 33
    .RecLetterQuality = True
		.PrintNormal 2, vbCrLf + vbCrLf + Chr(&H1B) + "|rA" + "TEL (123)-456-7890" + vbLf + vbLf + vbLf
    .PrintNormal 2, Chr(&H1B) + "|cA" + "Thank you for coming to our shop!" + vbCrLf
    .PrintNormal 2, Chr(&H1B) + "|cA" + fDate + vbCrLf + vbCrLf
    .PrintNormal 2, "Chicken                    $10.00" + vbCrLf
    .PrintNormal 2, "Hamburger                  $20.00" + vbCrLf
    .PrintNormal 2, "Pizza                      $30.00" + vbCrLf
    .PrintNormal 2, "Lemons                     $40.00" + vbCrLf
    .PrintNormal 2, "Drink                      $50.00" + vbCrLf + vbCrLf
    .PrintNormal 2, "Excluded tax              $150.00" + vbCrLf
    .PrintNormal 2, Chr(&H1B) + "|uC" + "Tax(5%)                     $7.50" + vbCrLf
    .PrintNormal 2, Chr(&H1B) + "|cA" + Chr(&H1B) + "|bC" + Chr(&H1B) + "|2C" + "Total    $157.50" + vbCrLf + vbCrLf
    .PrintNormal 2, "Payment                   $200.00" + vbCrLf
    .PrintNormal 2, "Change                     $42.50" + vbCrLf + vbCrLf
		.PrintNormal 2, Chr(&H1B) + "|fP"
	.TransactionPrint 2,12
  .DeviceEnabled = False
  .ReleaseDevice
  .Close
End With
end sub
</script>
</head> 
<body>  <INPUT TYPE="button" VALUE="Print Ticket" ONCLICK="print_ticket()" />
 
</body>
</html>
[+][-]10/22/09 03:16 AM, ID: 25632459

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Point of Sale, Printers, Scripting Languages
Tags: OPOS VBScript printer activeX
Sign Up Now!
Solution Provided By: seldon_26000
Participating Experts: 0
Solution Grade: A
 
 
 
Loading Advertisement...
20091111-EE-VQP-91 - Hierarchy / EE_QW_3_20080625