AnsweredAssumed Answered

Re-log in script

Question asked by david583 on Mar 2, 2010
Latest reply on Mar 7, 2010 by david583

Title

Re-log in script

Post

Filemaker Pro 10, Windows XP & Vista, Hosted Network (6 users)

 

I currently open my FM file using a script, in the script I have a re-log in step for the current user to log in.

 

I have switched on error capture and am looking for errors 212 & 213 for invalid users. This works fine.

 

However, if I press cancel instead of entering a username the application opens and editing is available (i.e. not guest)

 

Is there a way I can trap the cancel button in the log in screen to provide a dialog and exit the system? Or am I just missing something simple.

 

My log in script is:

   Go to Layout [ "start_screen" (START_SCREEN)

   Set Window Title [ Current Window; New Title: "CSDdb2.0: CSD Orders and Remake Database"

   Perform Script [ "daily_smiley"]

   Show/Hide Status Area [Hide]

   Show/Hide Text Ruler [Hide]

   Adjust Window [Maximise]

   Set Error Capture [On]

   Re-Login [ ]

   If [Get (LastError) = 212 or If [Get (LastError) = 213 ]

        Show Custom Dialog [ blah blah try again ]

        Re-Login [ ]

        If [Get (LastError) = 212 or If [Get (LastError) = 213 ]

             Show Custom Dialog [ blah blah try again ]

             Re-Login [ ]

             If [Get (LastError) = 212 or If [Get (LastError) = 213 ]

                  Show Custom Dialog [ blah blah too many tries exit application ]

                  Exit Application

             End If

        End If

   End If

   Set Error Capture [ off ]

   Halt script

Outcomes