#139011 - 2005-05-02 08:06 PM
A Newbie Form Question
|
jmontgom
Fresh Scripter
Registered: 2005-04-29
Posts: 33
|
Hello Everyone,
I am not sure where to start with this question so I am going to explain what I want to do. I want to create a pop up window once a user logs in with their account that will stop the login process and post a agreement from that they have to say yes too or it will not go any further. Is this possible ? If so I could not find the info and I am sorry I have been looking for an hour or so.
Thank You  Josh M
|
|
Top
|
|
|
|
#139012 - 2005-05-02 08:22 PM
Re: A Newbie Form Question
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Could start looking at something like this:
Code:
break on
$answer = messagebox("EULA", "Do you agree to the terms?", 4)
if $answer <> 6
?"logging you off..."
; logoff(1)
endif
exit 0
-Shawn
|
|
Top
|
|
|
|
#139013 - 2005-05-02 09:15 PM
Re: A Newbie Form Question
|
jmontgom
Fresh Scripter
Registered: 2005-04-29
Posts: 33
|
This is exactly what I was looking for. Thanks for the info. By the way do you know why the logoff does not work ??
Thanks Josh
|
|
Top
|
|
|
|
#139014 - 2005-05-02 09:38 PM
Re: A Newbie Form Question
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Did you uncomment the line?
Code:
break on $answer = messagebox("EULA", "Do you agree to the terms?", 4) if $answer <> 6 ?"logging you off..." logoff(1) endif exit 0
Failing that, you can check the errorlevel...
Code:
break on $answer = messagebox("EULA", "Do you agree to the terms?", 4) if $answer <> 6 ?"logging you off..." logoff(1) ? @ERROR + " : " + @SERROR endif exit 0
|
|
Top
|
|
|
|
#139015 - 2005-05-02 09:43 PM
Re: A Newbie Form Question
|
jmontgom
Fresh Scripter
Registered: 2005-04-29
Posts: 33
|
Yes I did figure out to take out the comment line. By the way why is it
<> 6 ???
Why 6
Thanks Newbie Josh
|
|
Top
|
|
|
|
#139016 - 2005-05-02 09:45 PM
Re: A Newbie Form Question
|
jmontgom
Fresh Scripter
Registered: 2005-04-29
Posts: 33
|
One Last Dumb Newb Question ;o)
Is their a way to put a max, min or a scrollbar on this message box ?
Thanks Josh
|
|
Top
|
|
|
|
#139018 - 2005-05-02 09:54 PM
Re: A Newbie Form Question
|
jmontgom
Fresh Scripter
Registered: 2005-04-29
Posts: 33
|
Sorry Chris,
I found the information in the manual.
I will read before I post any dumb questions (
Josh
|
|
Top
|
|
|
|
#139020 - 2005-05-02 10:19 PM
Re: A Newbie Form Question
|
jmontgom
Fresh Scripter
Registered: 2005-04-29
Posts: 33
|
I did thanks Shawn...
However as I read the message box info in the manual shouldn't I be able to use a "=" to define yes or no. For example should this not work ?
Code: --------------------------------------------------------------------------------
break on $answer = messagebox("EULA", "Do you agree to the terms?", 4)
if $answer = 6 ? "logging you on..." endif if $answers = 7 ? "logging you off..." LogOff(1) EndIf exit 0
--------------------------------------------------------------------------------
Thanks again for the help, I have a degree in programming but it has been forever since I have done any type of programming, as you can tell )
Thank You Josh
|
|
Top
|
|
|
|
#139021 - 2005-05-02 10:23 PM
Re: A Newbie Form Question
|
jmontgom
Fresh Scripter
Registered: 2005-04-29
Posts: 33
|
LOL
I had a TYPO
I found the problem and it is working, thanks.
Josh
|
|
Top
|
|
|
|
#139023 - 2005-05-02 10:42 PM
Re: A Newbie Form Question
|
jmontgom
Fresh Scripter
Registered: 2005-04-29
Posts: 33
|
It works well,
Thanks Shawn.
I have been looking is their any way to do a scroll bar on a message box. I dont see it in the manual.
Josh M
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 190 anonymous users online.
|
|
|