Password protect pages

General Discussion on DemoPad or related products
Post Reply
cesolutions
Posts: 3
Joined: Thu Jul 03, 2014 6:13 pm

Password protect pages

Post by cesolutions » Tue Sep 29, 2015 1:19 pm

Hello,

Is it possible to password protect indivdual pages?

How, or where do i find more information about this? (tried to search in help documents and forum for "password")

User avatar
DemoPad
Site Admin
Posts: 770
Joined: Thu Jun 14, 2012 10:46 am
Contact:

Re: Password protect pages

Post by DemoPad » Wed Sep 30, 2015 11:34 am

There is no inbuilt password protection for pages, but you can do it manually - by have a number keypad which sets flags & then performs a page jump based on the number entered, or by having hidden transparent buttons etc

gimbers
Posts: 26
Joined: Mon Jul 16, 2012 3:36 pm

Re: Password protect pages

Post by gimbers » Mon Jan 04, 2016 11:00 pm

Hi CSE & DemoPad,

I am also trying to do this for a client who wants his Theatre to turn off at 11pm so his kids go to bed. But if he is watching it, he doesn't want it to turn off. I thought the best way to do this was with a 4-digit passcode. I have been fiddling around with this for a while now, attached, but I can't get it to work.

I set [#passcode_set] to 1234, then I have numbers for [#1st passcode], [#2nd passcode] and so on that are entered via a keypad in the GUI. I do a calculation on these (*1000, *100 then add, and so on) to get [#passcode_entered] and I can see that this does or does not equal [#passcode_set].

I have set up a custom number action on [#passcode_entered] in that if it equals the value of another number, [#passcode_set] for both minimum or maximum, it sets the flag "passcode_correct" to ON, which reveals a button. But as soon as you enter any first digit (1, 2, 3, anything) this flag is set to on, even though [#passcode_entered] does not equal [#passcode_set]. [#passcode_set] is 1234, after pressing 4, [#passcode_entered} is 4000, but the flag still goes on.

Am I missing something?

Many thanks in advance,
gimbers
You do not have the required permissions to view the files attached to this post.

User avatar
DemoPad
Site Admin
Posts: 770
Joined: Thu Jun 14, 2012 10:46 am
Contact:

Re: Password protect pages

Post by DemoPad » Thu Jan 07, 2016 5:36 pm

It looks over complicated, but it actually seems to work for me. I get the 'RIGHT' button appearing when you enter 1234, and not if I enter anything else - tested with CentroControl latest version.

Note when the passcode is set to 7680, it will trigger when you press 768, because the number would equal 7680.

If you wanted to make it easier, just have 4 flags, no numbers, and a fixed passcode (all different numbers):

1stCorrect, 2ndCorrect,3rdCorrect, PINCorrect

If the passcode was to be 1234, then :

button 1 - sets 1stCorrect to Exclusively ON
button 2 - sets 2ndCorrect to ON, if 1stCorrect is ON, otherwise sets all flags to OFF
button 3 - sets 3rdCorrect ON if 2ndCorrect is ON, otherwise sets all flags to OFF
button 4 - sets PINCorrect ON, if 3rdCorrect is ON, otherwise sets all flags to OFF

buttons 5,6,7,8,9,0 just set the flags OFF.

Then your 'Enter' button just does something if PINCorrect is ON

gimbers
Posts: 26
Joined: Mon Jul 16, 2012 3:36 pm

Re: Password protect pages

Post by gimbers » Thu Jan 07, 2016 6:00 pm

OK, thanks DemoPad. I was testing it in DPad Control Lite. Maybe that had something to do with it?

It is complicated, isn't it! I did it this way so I can also set up a way for the client to enter their own passcode and change it over time. You know how these things are, passcodes get revealed and you need to update them. I couldn't see a simpler way to do it with this requirement...

Thanks again,
gimbers

User avatar
DemoPad
Site Admin
Posts: 770
Joined: Thu Jun 14, 2012 10:46 am
Contact:

Re: Password protect pages

Post by DemoPad » Sun Jan 10, 2016 10:07 pm

Yes - DemoControlLite is now discontinued, and when it was on the iTunes store it was several versions behind.

You are correct it is more complex when you are allowed to change the passcode, but this might help: use a label to build up a string first, then make a number equal the string:

Setting the Passcode:
Set a label called 'MyPasscode' to nothing
Button1 : Set MyPasscode = [MyPasscode]1
Button2 : Set MyPasscode = [MyPasscode]2
Button3 : Set MyPasscode = [MyPasscode]3
etc

So if you pressed 1,2,3, the MyPasscode label would be "123"
Save Button: Set a number called 'ThePasscodeNumber = [MyPasscode] = which sets the number equal to the numeric version of the label, which will have been built up by pressing (any number of) buttons.

Then do the same when entering the passcode, and when you press 'Login' see if the numeric version of the entered code = MyPasscode

Post Reply