Paolo Posted February 28, 2003 Posted February 28, 2003 I've a script like this: Enter Find Mode[Restore,Pause] Set Field[ "USER"," "=="&USER " ] Set Field[ "Password"," "=="&Password " ] Perform Find[] Most of the times it works perfect: the user types his name/pass, for example: USER: steve jobs Password: 123 then the script changes the request for finding USER: ==steve jobs Password: ==123 If the users types exactly his name/pass then one record is found and the user is authenticated. BUT SOMETIMES.... the script, after finding one record, applies the two "Set Field" to the record in browse mode(instead of applying it only to the find request). Taking the example, sometime Steve Jobs logs in and his username and password are changed into USER: ==steve jobs Password: ==123 I was not able to isolate the problem, it happens with a ratio of approx. 1:15 It happens completely random! It seem a FM bug. The file is served with FM Server on MacOs9. It's opened with FM Pro 5.5 on MacOs9. Any help would be gratly appreciated! Thanks
djgogi Posted February 28, 2003 Posted February 28, 2003 You should change the log in script to something like Script Start log in Set error Capture [on] Allow User Abort [off] Go To layout [login layout] Set Field [gUser, ""] Set Field [gPassword,""] Freeze Window loop PauseResume Script [] // for ever end loop Script Login Set error Capture [on] Allow User Abort [off] Freeze Window If [ not (IsEmpty(gUser) or IsEmpty(gPassword))] Enter Find Mode [] // no restore no pause Set Field [uSER, "=="&gUser] Set Field [Password, "=="&gPassword] Perform Find [] If[status(CurrentFoundCount)=1) //OK, do whatever you need after end if else //user failed to log in,take appropriate steps //like re-calling script Start log in, for ex or close app end if the second script should be attached to the button with option Exit Current Script selected. And of course gUser and gPassword are global text fields Dj
Paolo Posted March 3, 2003 Author Posted March 3, 2003 I was trying to have my login procedure activated at the time the user types "Enter" (just like the real log-in interfaces) The only way to do that is entering find mode before the user types username and password. I haven't tried your script yet, but it's clear that the user types his credentials in the global fields in browse mode. Pressing enter causes a new line to be added in the field the user is typing in. A lot of users get messed up with it.
Vaughan Posted March 3, 2003 Posted March 3, 2003 Many users consider the "Enter" and "Return" keys interchangeable -- and for the most part programs treat them so. However technically they are not interchangeable and FileMaker Pro is one application that handles them correctly. Return is on the main key group, while Enter is on the numeric keypad. The Enter key is the equivilent of clicking the mouse on the default button. I'll bet they are pressing Return.
Vaughan Posted March 4, 2003 Posted March 4, 2003 Return inserts carriage returns if the user is in a field. The Enter key on the numeric keypad exits the field and clicks the default button.
Recommended Posts
This topic is 7938 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now