Jump to content
Sign in to follow this  

Detecting that a user pressed an OK button.

Recommended Posts

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

[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")


Case $iMsgBoxAnswer = 1 ;OK

Case $iMsgBoxAnswer = 2 ;Cancel


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

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)



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

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

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