legend

do something while inputbox is open

5 posts in this topic

#1 ·  Posted (edited)

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



#2 ·  Posted

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


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted

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

#4 ·  Posted

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


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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