Jump to content

ProcessWait help freezes gui


Recommended Posts

You're a downright idiot and you totally don't deserve this.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$hWnd = GUICreate("Epic fail")
$startscan = GUICtrlCreateButton("Begin scanning for notepad.exe", 10, 10)

GUISetState()

Dim $scan = False
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $startscan
            $scan = True
            GUICtrlSetState($startscan, $GUI_DISABLE)
    EndSwitch
    
    If ($scan And ProcessExists("notepad.exe")) Then
        $scan = False
        GUICtrlSetState($startscan, $GUI_ENABLE)
        MsgBox(0, "","Bingo! Injecting the code! :D:D")
    EndIf
WEnd
Link to comment
Share on other sites

AutoIt is a single thread app. When you use processwait, the script will pause until the process exist. Do you see the word "WAIT" in the command??? If you do not understand what the word "Wait" means, learn to use a dictionary.

What ever you do, don't complain that you want it anyway and ask again to get someone to get it to work. Keep this crap up and surly as the sun will come up in the morning a moderator will take a giant dump on you. Now cut the bullshit and do what the other coders suggested. If you feel that everyone is wrong, then just do everyone a favor and stop annoying us. geeze.

Link to comment
Share on other sites

You're a downright idiot and you totally don't deserve this.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$hWnd = GUICreate("Epic fail")
$startscan = GUICtrlCreateButton("Begin scanning for notepad.exe", 10, 10)

GUISetState()

Dim $scan = False
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $startscan
            $scan = True
            GUICtrlSetState($startscan, $GUI_DISABLE)
    EndSwitch
    
    If ($scan And ProcessExists("notepad.exe")) Then
        $scan = False
        GUICtrlSetState($startscan, $GUI_ENABLE)
        MsgBox(0, "","Bingo! Injecting the code! :D:D")
    EndIf
WEnd

I woulnd't have done it.
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...