Jump to content

Recommended Posts

Posted

i have created 2 seperate scripts to help me in a game (not bots) that complement each other but occasionally, one will just crash. i must run one which will run the other, and send it data once. all of that works, but occasionally i will get an error message saying there was an error on a line that doesn't even exist

Posted Image

then

Posted Image

i barely have 42 lines!

i am able to reproduce the error, by spamming it, but is there some way to fix it? here is the source

i forgot to mention: this is made to send ctrl-click to the user-selected window(from the sister script) and to block from scrolling (in the same selected window)

#include<BlockInputEx.au3>
AutoItSetOption("TrayIconHide", 1)
#include<Misc.au3>
$dll = 'user32.dll'
$title = ""
While 1 ; in this part, it is awaiting user input from my other script
    $title = ConsoleRead()
    If $title <> "" Then
        ExitLoop
    EndIf
WEnd

While 1
    WinWaitActive($title)
    If _IsPressed('04', $dll) = 1 Then
        _BlockInputEx(1, "", "11", $title)
        Send("{CTRLDOWN}")
        Do
            Send("{CTRLDOWN}")
            MouseClick("left")
        Until _IsPressed('04', $dll) = 0
        Do
            Send("{CTRLUP}")
        Until _IsPressed(11, $dll) = 0
        _BlockInputEx(0)
    EndIf
WEnd
fin()
Func fin()
    Exit 0
EndFunc

btw, it is compiled as an exe but i change the extension to .lego so that it is not run on its own, so that it MUST be ran from the sister script. (ps. is there a better way to do that?)

also, is there a better way to hotkey mouseclicks other than _IsPressed?

thank you

Posted (edited)

so assumably i can just add the functions from the include to the end of my script, and then see what line that correlates to?

Edit: Then how am i supposed to find what is causing the error?

Edited by legoman1
Posted (edited)

i added that to the top, but nothing happens.

it has to be compiled, right?

Edit: so there is a difference b/w the one that comes with autoit and that one? (i'm pretty sure it came with autoit)

Edited by legoman1
Posted

so i got an error while compiling

-###2 Obfuscation Error: Found Execute() statement which will lead to problems running your obfuscated script.

>### current Func: _WinAPI_SetLayeredWindowAttributes

C:\Program Files\AutoIt3\include\WinAPI.au3(5364,1) Warning for line:$i_transcolor = Execute('0x00' & StringMid($i_transcolor, 5, 2) & StringMid($i_transcolor, 3, 2) & StringMid($i_transcolor, 1, 2))

strange because thats a default file...

oh btw thanks for all the help

the new scite looks better

the error is not critical but it annoys me

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
×
×
  • Create New...