Sign in to follow this  
Followers 0
ainner

Detecting that a user pressed an OK button.

9 posts in this topic

I'm curently migrating Lotus Notes and I need the user to input his password in the middle of my script. My problem is that I need a way of knowing when the OK button is pressed.

Is it possible to detect this event ?

Share this post


Link to post
Share on other sites



$confirm = MsgBox(0, "'ello!", "Blah Blah Blah-izzle")
    If $confirm = 1 Then
        ;add code here
    EndIf


[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

wouldnt you normally put it after the rest of the script after the msgbox? what exactly are you asking?

if you mean like after an ok/cancle, try this out:

Dim $iMsgBoxAnswer

$iMsgBoxAnswer = MsgBox(65,"Title","Text")

Select

Case $iMsgBoxAnswer = 1 ;OK

Case $iMsgBoxAnswer = 2 ;Cancel

EndSelect

if you mean an OK button that wasn't created by the script, then I have no idea XD


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

K let me reexplain this :)

Lotus Notes display a login panel with a OK and cancel button (The OK button is not something I created in a msgbox... It belong to lotus notes) everytime you open the program. I would like to know when the user is pressing the OK button of that specific panel.

Basicly I would like to be able to do this :

While 1

If Button1 IsPressed = 1 Then

Msgbox("Now I know you try to log in and I can continue my script once I made sure you entered the right password)

Endif

Wend

Basicly how can I check If the user pressed that OK button onthe lotus login box...

Edited by ainner

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Setup your script to wait for the lotus window, set it to hide, then show your own messagebox to get the answer from the user, then pass the answer to the lotus window. You should then know who pressed what.

:)

Edited by MHz

Share this post


Link to post
Share on other sites

Well what does the loginbox open ?? Maybe wait for that ??


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Try something like this:

#Include <Misc.au3>

While 1

If _IsPressed("0D") Then ExitLoop

Sleep(50)

WEnd

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  
Followers 0