Jump to content

Hard Script Need


Recommended Posts

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 by MikeTranser
Link to comment
Share on other sites

  • Moderators

MikeTranser,

Answer to Q1: Look at this thread - the second post is from the creator of AutoIt, sounds like a definitive answer to me! :mellow:

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Developers

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 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

^^ 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 by MikeTranser
Link to comment
Share on other sites

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 :mellow:

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 by MariusN
Link to comment
Share on other sites

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

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

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 :mellow:
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...