iamtech Posted July 24, 2018 Posted July 24, 2018 i tried to print ie windows with my default printer using _IEAction ($oIE, "printdefault") but it was not working sometimes, autoit icon showing in tray but not printing anything.
FrancescoDiMuro Posted July 24, 2018 Posted July 24, 2018 @iamtech Does the function return any error? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
iamtech Posted July 24, 2018 Author Posted July 24, 2018 1 minute ago, FrancescoDiMuro said: @iamtech Does the function return any error? Not any error
Juvigy Posted July 24, 2018 Posted July 24, 2018 When you hover the mouse over the icon you can see on which line of code it is. So on which line is it hanging?
iamtech Posted July 25, 2018 Author Posted July 25, 2018 17 hours ago, Juvigy said: When you hover the mouse over the icon you can see on which line of code it is. So on which line is it hanging? My Full code is : #include <IE.au3> #include <MsgBoxConstants.au3> Opt("TrayAutoPause",0) HotKeySet("{ESC}", "Quit") Func Quit() Exit EndFunc $oIE = _IEAttach ("Gujarat PDS Shop") _IELoadWait($oIE) $body = _IEBodyReadHTML($oIE) If StringInStr($body, "Bill Details) Then $Dbillreceiptdetails = _IEGetObjById($oIE, "billreceiptdetails") $Dbillreceiptdetails.RemoveNode(True) $DitemgridDetails = _IEGetObjById($oIE, "itemgridDetails") $DitemgridDetails.RemoveNode(True) _IEAction ($oIE, "printdefault") _IEAction(_IEGetObjById($oIE,"lnkbill"),"click") WinWait("Select a filename to write into") WinActivate("Select a filename to write into") endif
FrancescoDiMuro Posted July 25, 2018 Posted July 25, 2018 (edited) 48 minutes ago, iamtech said: If StringInStr($body, "Bill Details) Then Add a " after Bill Details Edited July 25, 2018 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
iamtech Posted July 25, 2018 Author Posted July 25, 2018 1 hour ago, FrancescoDiMuro said: Add a " after Bill Details Sorry but it was already added in my script, its working well, but only not work sometimes.
Juvigy Posted July 25, 2018 Posted July 25, 2018 You still havent told us WHERE is it hanging? Or do you get any error ?
iamtech Posted July 25, 2018 Author Posted July 25, 2018 53 minutes ago, Juvigy said: You still havent told us WHERE is it hanging? Or do you get any error ? @Juvigy i did not get any error, but it was only hanging on printing, the print is not send to printer sometime.
FrancescoDiMuro Posted July 30, 2018 Posted July 30, 2018 @iamtech I'd put an If...Else...EndIf statement after the _IEAction ($oIE, "printdefault") so you can see, if the error is occurring right there Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
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