HyperCard - Password Hack - Script ---------------------------------- on openstack reset menubar --case, it's changed from other stacks global ulevel put the userlevel into ulevel set userlevel to 5 set scroll of cd fld id 3 to 0 end openstack on resume reset menubar hide msg end resume on closestack set loc of msg to 5,200 go cd 1 global ulevel set userlevel to ulevel put empty into cd fld show set scroll of cd fld id 3 to 0 if (freesize of this stack/size of this stack)>.1 then put "Closing Stack" wait 50 put "Compacting Stack.....Saving Bytes" domenu "compact stack" end if hide msg end closestack on mouseUp domenu "Background" unlock screen with visual effect scroll down slow end mouseUp 0$``"@ drR JJJÄX’ Ask Password -- Password Hack Stack -- by Lex Kontrovitz Vision Software 1993 -- XFCN by Frederic Rinaldi -- Stack is freeware -- Distribute, upload, dissect at will -- E-mail to fffaramir@aol.com -- -- by the way,to get this particular script to work I used the -- word "vision". You can change this, but you'll have to adjust the -- calculations to come out right for your word. on mouseUp global a,b,c,d,e,n --declare global variables get GetPassWord() -- calls the XFCN you paste in with Resedit if it ­ empty then --be sure the user typed in something put it into n --put the user's response into n put empty into it --flush empty R --call the "R" procedure to test the password else --case-> the user cancelled or typed nothing exit mouseup --exit handler so user can resume end if end mouseUp on R global a,b,c,d,e,n --declare global variables put n into cd fld show -- put the number in the fld so you can see it repeat for 1 -- repeat loop for declaring the vars put char 1 of n into a -- put the first ascii character of n into a put char 2 of n into b -- and so on put char 3 of n into c -- " put char 4 of n into d -- " put char 5 of n into e --* see note below put empty into n --in case of snoops and other strangeness end repeat if (a * d) * e = (d * c) * (a + b) then -- do the calculation --ADD YOUR CODE TO DO ANYTHING HERE -- If the password was correct,you can put anything you want here -- If you change the password, you'll need to adjust the above -- calculation to match the numerical value of your own word -- Your number will appear in the small field on the opening card repeat for 2 set the hilite of cd btn flash to not the hilite of cd btn flash play harpsichord tempo 650 e4q e4q d4q d4q c4q c4q b3q b3q --user typed in "VISION" end repeat answer" Yep, that's it" --feedback to user, very important else answer " That's incorrect" & return & " The number your word returned is in the" & return & " small field on the bottom right" --if the password was wrong end if end R --** note: there is a char 6 in the word "vision", but I -- just didn't use it Screen Shot on mouseUp lock screen hide titlebar go next unlock screen with visual effect scroll right end mouseUp See the script on mouseUp edit script of cd btn id 1 end mouseUp Simplest Example on mouseUp go card 3 end mouseUp New Button on mouseUp domenu "Close Stack" go home end mouseUp New Button on mouseUp lock screen show bg pict domenu "Background" unlock screen with visual effect scroll up end mouseUp Low Security Password Stack This is a simple password scheme using the Rinaldi XFCN. (External function) It's helpful because you can't see the characters as someone types them in. When you type any word in the password dialog box and press return, the XFCN gives you back a number. (It will be displayed in the small field below) Once you have this number that corresponds to the name you typed in, you can set up any type of conditional tests to perform Hypercard commands. What the Buttons do: ¥Ask Password--dialog box comes up ¥ See the script-- shows commented Hypertalk code that drives the function. ¥Screen Shot-- shows what you should see if you use Resedit to copy the XFCN into your own stacks. Be careful and make a backup first in case you screw up. ¥?--Credits for the XFCN builder and me The password for this setup is -> vision ¥Simplest Example --code at its most basic You can change the password but you'll have to adjust the calculation in the code to match it. This could be as simple as the code in the Simplest Example button Click on that button to see the code. The simple example uses the word "Bob" for the password. What you typed in returned this number-> --on vw -- answer" no can do ........*&^%*&^%$_)(*& " --end vw on opencard show titlebar show bg pict end opencard on closecard hide bg pict end closecard $$$$$$$ Go Back on mouseUp visual effect scroll left go prev end mouseUp -4iah$ S?<|p>Â| Go Back on mouseUp go cd 1 end mouseUp SIMPLEST EXAMPLE FOR CALCULATION on mouseUp global n --declare global variable get GetPassWord() -- calls the XFCN if it ­ empty then --be sure the user typed in something put it into n --put the user's response into n put empty into it --flush any variable in it if n = 491485 then --simple calculation answer "you got it right"-- or anything else you want end if else -- the user cancelled or typed nothing exit mouseup --exit handler so user can resume end if end mouseUp --the number 491485 is the result of typing in "bob" Chicago Geneva r det slutÉ