Newbies Huaxi Posted August 28, 2003 Newbies Posted August 28, 2003 When user come in, they will see the login page, enter userid and password then press "login" button, however, we want everything to be able to be done by keystroked as well as with the mouse. i.e. after putting an userid, using the return key should go to password filed, after putting the password, using the return key should log in automatically. Any ideas? Thanks all
Chuck Posted August 29, 2003 Posted August 29, 2003 Unfortunately, you can't really use the Return key in this manner, although you can use the Enter key instead. Return will always give a field a carriage return. Howver, you can use a script that is something like the following: Go to Field [ userid ] Pause/Resume Script [] Go to Field [ password ] Pause/Resumt Script [] # Rest of the login routine. By using a script like this, the script will pause after entering each field. Pressing the Enter key will continue the script. Chuck
Chuck Posted August 29, 2003 Posted August 29, 2003 Another alternative, if you're using FMP 6, is to use the Show Custom Dialog script step, which could then have two fields, one for the userid and one for the password, with a default button for logging in. Show Custom Dialog [ "Enter your user name and password:", Field1: username, Field2: password (bullet field), Buttons: "Login"] You can move from field to field with the tab key and activate the dialog box with either the Return or Enter keys. Chuck
CobaltSky Posted August 30, 2003 Posted August 30, 2003 There is a way to do what you want, even without version 6 and its custom dialog boxes. Chuck is right about the return key - at least as far as browse mode is concerned, but he has overlooked the fact that the return key *does* continue a script in find mode. Therefore the solution to your problem is to have your login script lock the layout down and place the user temporarily into find mode while the script is paused, and provide them with ordinary text fields (not globals) to enter their details into (globals are not accessible in find mode). Then immediately after the scripted pause, have your script transfer the contents of the text fields to globals and reinstate browse mode. BTW, you don't need additional text fields for this purpose - you can use any two existing text fields from within your solution. Attached is a demo file called 'Use_Return.fp5' which shows the technique in action. Use_Return.zip
Recommended Posts
This topic is 7760 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