Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2008
    Posts
    14

    Password related

    I have 3 pages in my application.
    On the first page I placed an Input box and a button.
    I would like to check if the user entered a specific password he will be transfered to Page2 else he will be transfered to Page3.

    The example of Increeption/decription I found on the example forum did not work when I changed it to:
    Code:
    sUser =Input.GetText('Input1');
    
    if sUser == "password" then
    Page.Jump('Page2');
    else
    Page.Jump('Page3');
    end
    Any recomendation?

  2. #2
    Join Date
    Aug 2003
    Posts
    2,427
    You need to enclose strings in double quote marks e.g. "something".

    Try -

    Code:
    sUser = Input.GetText("Input1");
    
    if sUser == "password" then
    Page.Jump("Page2");
    else
    Page.Jump("Page3");
    end

  3. #3
    Join Date
    Apr 2008
    Posts
    14
    Thanks but still not working.
    Can it be related to the fact I am using the resize example together with it?
    Since I've combined both examples, now the resize doesn't work as well.

  4. #4
    Join Date
    Aug 2003
    Posts
    2,427
    I can't say about that but the amended code does work. This is assuming you have at least 3 pages, Page1, Page2 and Page3 and the code is in the on click event of your button and the user has input " password " as the password.

  5. #5
    Join Date
    Apr 2008
    Posts
    14
    thats correct.
    All of the above you wrote is what I have placed.

    I shall try to restart from the begining with no other objects on the pages.

    Thank you very much for the help.

  6. #6
    Join Date
    May 2006
    Posts
    1,443
    what is not worked ..?

    Page.Jump( "Page2");
    are page names correct ??

    because following code seems well
    Code:
    sUser = Input.GetText("Input1");
    
    if sUser == "password" then
    Page.Jump("Page2");
    else
    Page.Jump("Page3");
    end

  7. #7
    Join Date
    Apr 2008
    Posts
    14
    When I click on the button it always go to page3 and never to page2 even if the password is correct

  8. #8
    Join Date
    Aug 2003
    Posts
    2,427
    Is the password the actual word " password " or is it something else? What I mean is are you actually typing that into the input object.

    Remember also that AMS is always case sensitive so "Password" and "password" are not the same.
    Last edited by longedge; 04-29-2008 at 10:30 AM.

  9. #9
    Join Date
    Apr 2008
    Posts
    14
    I have attached a sample so please kindly see what am I doing wrong.

    Thanks.
    Attached Files

  10. #10
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    The object is called Input1 but it's actually a RichText Object. I've taken the liberty of redoing your example

    PS: Never ever ever upload am7's. Always upload APZ's. You can make these by going to File and Choosing export.
    Attached Files

  11. #11
    Join Date
    Apr 2008
    Posts
    14
    Thank you very much !
    It is working briliantlly.

    Since it is my first time trying anything I didn't even know there is such an Input object and used a RichText.

    Thanks a milion.

Similar Threads

  1. Need Help: Input password without popup
    By nals in forum AutoPlay Media Studio 6.0
    Replies: 21
    Last Post: 05-04-2007, 12:08 PM
  2. Adding Password Protection
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 10-03-2003, 03:25 PM
  3. Reoccurring password
    By Bruce in forum AutoPlay Media Studio 4.0
    Replies: 6
    Last Post: 06-04-2003, 04:09 PM
  4. Password
    By Bruce in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 05-31-2003, 05:52 PM
  5. HOWTO: Add Password Protection to Your Application
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 03:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts