Jump to content
Sign in to follow this  
legend

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

    _AD_Open()

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

Edited by legend

Share this post


Link to post
Share on other sites

@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!

Share this post


Link to post
Share on other sites
11 minutes ago, JLogan3o13 said:

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

That's actually not a bad idea :) Thank you

Share this post


Link to post
Share on other sites

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


A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat

3fHNZJ.gif

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

Share this post


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)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

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

        case $ok
            $read_input = GUICtrlRead($Input1)
            guidelete($form1)
            Return($read_input)

        Case $cancel
            Exit

    EndSwitch
WEnd
EndFunc

 

Edited by legend

Share this post


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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...