Jump to content
Sign in to follow this  
the101dan

Need help

Recommended Posts

the101dan

I am trying to make a bot that closes something everytime it pops up. I have msgboxes in the bot and it only closes the thing after click something on the msgbox. I need help, so that the msgbox doesn't interfere and it closes that thing as soon as it is there. Thanks a bunch

Share this post


Link to post
Share on other sites
Cw2K1

something like this?

While 1
    $Name = "Your_Window_Name_Here"
    WinWait($Name, "")
    WinActivate($Name, "")
    WinWaitActive($Name, "")
    Send("{Enter}") ; will send a enter button to the active window
    Sleep(1000)
    If WinExists($Name, "") Then
        WinClose($Name, "")
    EndIf
WEnd

Enjoy the complexity.Feel the power of simplicity.

Share this post


Link to post
Share on other sites
the101dan

something like this?

While 1
    $Name = "Your_Window_Name_Here"
    WinWait($Name, "")
    WinActivate($Name, "")
    WinWaitActive($Name, "")
    Send("{Enter}") ; will send a enter button to the active window
    Sleep(1000)
    If WinExists($Name, "") Then
        WinClose($Name, "")
    EndIf
WEnd

Woah, I just tried again and the hotkey I used to stop it worked. I still need help. Am I doing something half right with the hotkey? Is that why it works about half of the time? Thanks for all of the help

Edited by the101dan

Share this post


Link to post
Share on other sites
dbzfanatic

1) autoit is single thread not multi thread,you can only do one thing at a time, 2) most people won't help with a childish prank script.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.