MikeTranser Posted March 8, 2010 Share Posted March 8, 2010 (edited) Hello i need very good script:My program working 20min (Error) sometimes 10h (Error) LOL?Include IE3.au3 etc.Example:If Program Have Problem in working before that "(Error AutoiT Line:xxxx)" Then program go func xyz() Edited March 8, 2010 by MikeTranser Link to comment Share on other sites More sharing options...
MikeTranser Posted March 8, 2010 Author Share Posted March 8, 2010 I need anti debug script Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 8, 2010 Moderators Share Posted March 8, 2010 MikeTranser,Answer to Q1: Look at this thread - the second post is from the creator of AutoIt, sounds like a definitive answer to me! Answer to Q2: You have asked this sort of question before and your thread was locked - do you really want to ask it again? It will only end in tears..... M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
MikeTranser Posted March 8, 2010 Author Share Posted March 8, 2010 I dont understand this i need if program debug (error) then set error=0 and go working more... Link to comment Share on other sites More sharing options...
dani Posted March 8, 2010 Share Posted March 8, 2010 (edited) What? If @error = 1 the script will continue like nothing happened anyway Edited March 8, 2010 by dani Link to comment Share on other sites More sharing options...
MikeTranser Posted March 9, 2010 Author Share Posted March 9, 2010 My script have 3 GUI and 17 Func (4754 Line). And Where i must add this func? And Every one have easy script? If Error Then program working? Link to comment Share on other sites More sharing options...
Zibit Posted March 9, 2010 Share Posted March 9, 2010 The best debug script is you... do debugging atleast 1h if still fails... come to us and post a script... Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
Developers Jos Posted March 9, 2010 Developers Share Posted March 9, 2010 (edited) My script have 3 GUI and 17 Func (4754 Line). And Where i must add this func? And Every one have easy script? If Error Then program working?How on earth can you ask where to put your error checking when you have a 4754 lines script? Edited March 9, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
MikeTranser Posted March 9, 2010 Author Share Posted March 9, 2010 (edited) ^^ Every One have small anti debug script? Becouse this not working: Global $success = 1AdlibEnable("errorHandle")$success = functionHere("stuff").........Func errorHandle() If (Not $success) Or @error Then ConsoleWrite("Failure" & @CRLF) Exit 1 EndIfEndFunc And Meaby this script is good? Global $success = 1 $success = start() Func errorHandle() If (Not $success) Or @error Then ConsoleWrite("Failure" & @CRLF) Exit 1 EndIf EndFunc Start have 17 func in while. Edited March 9, 2010 by MikeTranser Link to comment Share on other sites More sharing options...
MikeTranser Posted March 14, 2010 Author Share Posted March 14, 2010 (edited) How make Exit 1? Exit my program? And how to test this script? Meaby my script is good for anti debug? : If @error <> 0 Then SetError(0) EndIf Edited March 14, 2010 by MikeTranser Link to comment Share on other sites More sharing options...
MariusN Posted March 14, 2010 Share Posted March 14, 2010 (edited) Debugging your script? 1) Run it in Scite and look at the bottom for errors...thats the first rule 2) This might seem like a long way, but its effective and i use this all the time...If you don't get errors at the bottom, try putting in "messageboxes" after functions you "think" might not work properly or might contain errors...Name your msgbox's the functions name ie under func Test() you will put msgbox(0,"func test","my first msgbox")in the text area so you know where you are... If this messagebox pops up, you know your function was triggered...if not, your command calling the func Test() may be at fault...just an idea I battled my BACKSIDE of with a bandwidth monitoring script that gave me gray hairs...At the end i found out that "some" commands (especially DOS or WIN commands), RunWait doesnt work...After some time your script will error out...Reason? The DOS command (if i may call it like that) needed TIME to execute properly...all i then did was add a Sleep(100) AFTER the RUN command..All errors GONE! ...just a tip Edited March 14, 2010 by MariusN Link to comment Share on other sites More sharing options...
MikeTranser Posted March 14, 2010 Author Share Posted March 14, 2010 Iam have only errors if IE not load or load timeout. Link to comment Share on other sites More sharing options...
dani Posted March 14, 2010 Share Posted March 14, 2010 Then try to somehow 'catch' that error and handle it. It's really not that difficult. If you really can't do it then just post the lines that give you errors and will help you find the problem.. Link to comment Share on other sites More sharing options...
MikeTranser Posted March 14, 2010 Author Share Posted March 14, 2010 Hmm this is my one func: Func zaloguj() Sleep(100) Global $I = _IECreate("http://x", 0, $show) errorHandle() $bodyhtml3 = _IEBodyReadHTML($I) $s2 = StringInStr($bodyhtml3, "ErrorPageTemplate") If $s2 = 0 Then $logi = GUICtrlRead($LoginGui) $hasl = GUICtrlRead($HasloGui) $login = _IETagNameGetCollection($I, "input", 1) $haslo = _IETagNameGetCollection($I, "input", 2) _IEFormElementSetValue($login, $logi) _IEFormElementSetValue($haslo, $hasl) $bodyhtml = _IEBodyReadHTML($I) $b = StringInStr($bodyhtml, "login") $bs = _IETagNameGetCollection($I, "input") For $b In $bs If $b.src = "login.png" Then _IEAction($b, "click") Next _IELoadWait($I) errorHandle() EndIf Sleep(100) EndFunc ;==>zaloguj Link to comment Share on other sites More sharing options...
dani Posted March 14, 2010 Share Posted March 14, 2010 Hmm this is my one func: Func zaloguj() Sleep(100) Global $I = _IECreate("http://x", 0, $show) errorHandle() $bodyhtml3 = _IEBodyReadHTML($I) $s2 = StringInStr($bodyhtml3, "ErrorPageTemplate") If $s2 = 0 Then $logi = GUICtrlRead($LoginGui) $hasl = GUICtrlRead($HasloGui) $login = _IETagNameGetCollection($I, "input", 1) $haslo = _IETagNameGetCollection($I, "input", 2) _IEFormElementSetValue($login, $logi) _IEFormElementSetValue($haslo, $hasl) $bodyhtml = _IEBodyReadHTML($I) $b = StringInStr($bodyhtml, "login") $bs = _IETagNameGetCollection($I, "input") For $b In $bs If $b.src = "login.png" Then _IEAction($b, "click") Next _IELoadWait($I) errorHandle() EndIf Sleep(100) EndFunc ;==>zaloguj What is the error and at what line does it occur? Only giving a piece of code won't do it 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