March 29, 200421 yr Hey guys! I have a(nother) question which I am hoping someone can help me out with. Is it possible to, on the first time the database is opened, show one Layout (as in a "help screen") but on every other time it is opened (2 - forever) it shows a differently Layout? I would imagine that would be accomplished with a script and perhaps a global attribute? I don't know though how to go about it really. Thanks as always Version: v7.x Platform: Mac OS X Panther
March 29, 200421 yr Yep. 1. Define a global field called, "_gStartup" or whatever you want to call it. 2. Create a script called "reset" which sets _gStartup to a value such as "1" 3. In your startup script check for "1" in _gStartup. If its a match set it to "0" and redirect to your help layout. The purpose of step 2 is to reset it whenever you want. See the attached file. Version: Developer v7 Platform: Windows XP Sample.zip
March 29, 200421 yr Author Thanks for the help file man! I love it when I get those... learn so much from them. Also, that question mark graphic is PIMP! Where did you get that? Is it royalty free?
March 29, 200421 yr Author Well no matter what I try I can't get it to go to the help screen. I have triple checked the settings against yours but just can't see what is going wrong! Can I have other things in the startup script before the IF/Else statement? I do...
March 30, 200421 yr Author Nevermind... I found out I had to enter a number into the global field... thought the script would do it for me
March 30, 200421 yr Yup - you can get as elaborate as you want with the if/thens. you can embed them to create hierarchical (sp?) if statements such as: if _gFirstRun = 1 if get (systemplatform) =-2 show message "running windows" else show message "running mac" endif else go to layout "your layout" endif Excuse the crude syntax but you get the idea. PIMP? whats pimp?!?! LOL
March 30, 200421 yr Author Pimp = Cool... new slang. Well an old word resurected. Did that question mark graphic come from some kind of image resorce? Did you make it? Was just wondering if it was safe to use in my help file or someone owned it.
March 30, 200421 yr Sintax said: Pimp = Cool... new slang. *******, I'm getting old. Reguarding the cool "PIMP" graphic, I went to that site you mentioned and found lots of "PIMP" things to download, but I can't seem to get the same effects with the transparency that you did in yours. How did ya do that? I need the remedial course - I road the short bus to school - . (By the way - did the the use of "PIMP" make me seem any younger yet?- I'm gonna try it on my kids and see how I rate on the cool meter.)
March 30, 200421 yr Hello Is it possible to make a the first layout password protected - So they only see it once and add information but all other times it is protected so they can't get there? Is that possible cause that would be hot. Thanks Stan
March 30, 200421 yr Author I am by no means an expert on this subject but I have a trick that I did (which appears to work thus far). I wanted a splash screen so I made a layout called "Splash" and in my Start Up script called it, paused for 4 seconds and then proceeded to another layout. There is no way to get back to that Splash layout unless you close down and open the file back up. (since all my navigation is done with scripts and there are no links to that layout) Using the logic of the exampe above that was given to me, can't you make your "one time only" layout my "Help" layout. Meaning that the script checks to see if the file has ever been open and if not it displays your super secret layout. If the script detects that the file has been opened more then once it will not show that page ever again. That "One Time Layout"... he's so hot right now (taking your "hot" slang and applying it to the movie Zoolander. An aweful movie unless you watch in a dozen times and then you can sink to its level and start to laugh) Version: v7.x Platform: Mac OS X Panther
March 30, 200421 yr Yes, there are several ways to achieve having your "secret" layout a one time option which afterwards requires a password. Assuming you're using FM 7 you could use the in-built accounts and privledges to do change the password after the first run. You could also adopt an FM76 approach and store a password in a global field somewhere but if you do that then I would suggest you review the thread on security and privledges because this is a very unsecure approach unless you use a hashed passwd or some other process to encrypt the password. It doesn't need to be complex, just something to prevent the password from living clear text within the solution. Steve
Create an account or sign in to comment