Page 1 of 1 1
Topic Options
#76885 - 2003-09-25 03:40 PM Default Button in MessageBox
skody Offline
Fresh Scripter

Registered: 2003-03-24
Posts: 6
Hello,

I am using the following messagebox with a 10 second timeout. The default button should be "No" but if I let it time out "Yes" is selected. Any help?

I've this works the same on v4.12 and v4.21

$x=messagebox("This workstation's home office will be the $Office.@crlf@crlf" +
"Would you like to change this workstation's home office?",
"SS&D Windows XP Rollout",4388,10)
if $x=7
"NO" ?
else
"YES" ?
endif

Thanks, in advance, for your help,

Scott

Top
#76886 - 2003-09-25 04:04 PM Re: Default Button in MessageBox
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
If it the box times out, it returns -1.
quote:

Returns: The value returned by MESSAGEBOX indicates which button was selected, as shown in the following table.
Value
Meaning

-1
User did not respond to the dialog box within the specified time-out period.

1
OK button selected.

2
Cancel button selected.

3
Abort button selected.

4
Retry button selected.

5
Ignore button selected.

6
Yes button selected.

7
No button selected



_________________________
Eric

Top
#76887 - 2003-09-25 04:08 PM Re: Default Button in MessageBox
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
When the dialog comes up, you should notice the heavy line around the No button so the default is working properly. If you let it timeout, then it returns -1, not the default.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Mart 
Hop to:
Shout Box

Who's Online
2 registered (Mart, Jochen) and 163 anonymous users online.
Newest Members
mdress, Jagcats, Dramamu, Tamperold, RrrDdd
17677 Registered Users

Generated in 0.029 seconds in which 0.011 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org