Jump to content

Recommended Posts

Posted

Is there any way to have the script continue after a function is executed that pauses the script, such as the MsgBox function? I want to have a MsgBox notification but have the script start doing the next thing while the MsgBox is still up. Any ideas?

Posted

Is there any way to have the script continue after a function is executed that pauses the script, such as the MsgBox function? I want to have a MsgBox notification but have the script start doing the next thing while the MsgBox is still up. Any ideas?

You can use a timer (_Timer_SetTimer), or more simply just use your own gui instead of a MsgBox.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Posted

I have made my own GUI. What I want to do is when the user clicks a button, say, one that extracts a file from the executable, have a msgbox come up and say "Ok, extracting file", but have it start extracting the file even before the user hits the ok button on the msgbox.

Posted

This maybe close...

Run("notepad.exe")
WinWaitActive("")
Sleep(3000)

ProcessApproval("notepad.exe")


Func ProcessApproval($Process)
    $Script = ""
    $Script &= '$ret = MsgBox(262193,"Process Approval Needed","The new Process ""' & $Process & '"" needs approval. " & @CRLF & @CRLF & "Press  OK  to allow this Process to continue." & @CRLF & @CRLF & "Press Cancel to close this process." & @CRLF)' & @CRLF
    $Script &= 'If $ret = 1 Then' & @CRLF
    ; YOU NEED THIS INFO BELOW
    $Script &= '    ControlSend("Untitled","", "Edit1", "' & $Process & '")' & @CRLF
    $Script &= 'Else' & @CRLF
    $Script &= '    ProcessClose("' & $Process & '")' & @CRLF
    $Script &= 'EndIf' & @CRLF

    Local $file_loc = @ScriptDir & "\Killer.au3"
    FileDelete($file_loc)
    FileWrite($file_loc, $Script)
    If @Compiled = 1 Then
        $file_exe = FileGetShortName(@AutoItExe & ' /AutoIt3ExecuteScript "' & $file_loc & '"')
        Run($file_exe)
    Else
        $file_au3 = FileGetShortName($file_loc)
        Run(@AutoItExe & " " & $file_au3, "", @SW_HIDE)
    EndIf

EndFunc   ;==>ProcessApproval

8)

NEWHeader1.png

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