-- card: 6707 from stack: in.1 -- bmap block id: 0 -- flags: 0000 -- background id: 3468 -- name: -- part 1 (button) -- low flags: 00 -- high flags: A003 -- rect: left=180 top=108 right=137 bottom=314 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Deprotect Stack ----- HyperTalk script ----- on mouseUp put filename("STAK") into fname if fname is empty then exit mouseUp deprotect fname if the result is empty then answer "Deprotect Successful" with "OK" else if the result is -49 then answer "Sorry, that file is busy." else if the result is -44 then answer "Sorry, the disk is locked." else answer "Failed: unexpected file system error: " & the result with "OK" end mouseUp -- part contents for background part 1 ----- text ----- This XCMD removes the password from a Hypercard Stack (filetype "Stak"), and sets it to empty. Use it in conjuntion with XFCN "FileName" so that only a filetype of "Stak" can only be chosen. An error trapping numerical result is returned after attempt. BE CAREFUL! result = empty --successful deprotection result = -44 -- unsuccessful, disk was locked result = -49 -- unsuccessful, file was busy The button above will prompt for a stack, then (if possible) remove any password for that stack and set the maximum access level back to Scripting. This button is provided in the interests of those who somehow forget the password assigned to a stack. Please use it responsibly. ----------------------- example: on mouseUp put filename("STAK") into fname if fname is empty then exit mouseUp deprotect fname if the result is empty then answer "Deprotect Successful" with "OK" else if the result is -49 then answer "Sorry, that file is busy." else if the result is -44 then answer "Sorry, the disk is locked." else answer "Failed: unexpected file system error: " & the result with "OK" end mouseUp -- part contents for background part 8 ----- text ----- Ned Horvath, Allan Foster Ned Horvath, Allan Foster -- part contents for background part 2 ----- text ----- Deprotect -- part contents for background part 4 ----- text ----- Deprotect -- part contents for background part 9 ----- text ----- XCMD