Jump to content

do something while inputbox is open

Recommended Posts

I'm using the active directory udf by water.

Is it possible to do something while a inputbox is on the screen?

The thing is I want to open a connection to active directory (this can take up to 2 seconds),

I don't want to wait before opening the inputbox, and i don't want to wait after the inputbox is gone.


    $@username= InputBox("username", "insert username", "")
    If @error Then Exit


Any suggestions? I don't think it's possible, but worth a shot.. :)

Edited by legend
Link to post
Share on other sites
  • Moderators

@legend Inputbox is a blocking function, so there is no native way to two another action while it is up. You could create your own GUI for the input feature. 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
Share on other sites
17 hours ago, TheDcoder said:

Custom InputBox would be a really cool code snippet, I am tempted to make it myself :D

Func inputbox_gui($title, $content)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate($title, 286, 160)
$Label1 = GUICtrlCreateLabel($content, 16, 16, 45, 20)
$Input1 = GUICtrlCreateInput("", 16, 56, 257, 24)
$ok = GUICtrlCreateButton("Ok", 32, 104, 89, 33)
$cancel = GUICtrlCreateButton("Cancel", 152, 104, 89, 33)
#EndRegion ### END Koda GUI section ###

Local $aAKeys[1][2] = [["{ENTER}", $ok]]

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE

        case $ok
            $read_input = GUICtrlRead($Input1)

        Case $cancel



Edited by legend
Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...