home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
- <stack>
- <name>in</name>
- <id>-1</id>
- <cardCount>3</cardCount>
- <cardID>3022</cardID>
- <listID>2087</listID>
- <cantModify><false /></cantModify>
- <cantDelete><true /></cantDelete>
- <cantAbort><true /></cantAbort>
- <cardSize>
- <width>512</width>
- <height>342</height>
- </cardSize>
- <script>on openStack
- -- Needs: User preferences card of the home stack
- -- remembers user specified preferences for later
- global Stacks,Applications,Documents,UserName,userLevelprefs
- lock screen
- set lockRecent to true
- set lockMessages to true
- push this card -- remember where we are
- go home -- will take us to the home stack in case we're not there
- put cd fld "User Level" of cd "User Preferences" into userLevelprefs
- pop card -- return to where we were
- set lockRecent to false -- clean up for exit
- set lockMessages to false
- unlock screen
- go to card 1
- get the short name of cd btn id 37
- if it = "Administrative" then set userLevel to 1
- if it = "Set Up for Use" then set userLevel to 5
- if the userLevel < 5 then
- set the cantModify of this stack to false
- set the cantAbort of this stack to true
- hide MenuBar
- disable menu "Go"
- disable menu "Edit"
- disable menu "File"
- set the cantModify of this stack to true
- else
- end if
- show cd btn "Go"
- show cd btn "Cancel"
- show cd btn id 37
- end openStack
-
- on closeStack
- global userLevelprefs
- set userLevel to userLevelprefs
- end closeStack
-
- on idle
- get the userLevel
- if it < 5 then
- hide card button "Administration" of card 1
- hide card button "Open User Log" of card 1
- hide card button "Close User Log" of card 1
- hide card button "Clear User Log" of card 1
- hide card button "User Log Name" of card 1
- hide card button "Help" of card 1
- go to cd 1
- else
- show card button "Administration" of card 1
- show card button "Open User Log" of card 1
- show card button "Close User Log" of card 1
- show card button "User Log Name" of card 1
- show card button "Help" of card 1
- end if
- end idle
-
- on arrowKey
- get the userLevel
- if it < 5 then
- beep
- else
- pass arrowKey
- end if
- end arrowKey
-
- on showError
- global usersVolume,sourceFile,destFile,loopCount,sourceFolder,¬
- destFolder,folderName,erasefolder,error,success,job,SDCount,¬
- buttonName,errMessage
- if error = -1 then
- put "Not enough memory to copy" into error
- put "Ran out of RAM memory during installation......aborting!"¬
- into errMessage
- abortInstall
- else
- if error = 1 then
- put "Cannot open source file (file not found)" into error
- put "Can't read the file...aborting!" into errMessage
- abortInstall
- else
- if error = 2 then
- put "Cannot create destination file" into error
- put "Can't create the file...aborting!" into errMessage
- abortInstall
- else
- if error = 4 then
- put "Error reading source file" into error
- put "Can't read the file...aborting!" into errMessage
- abortInstall
- else
- if error = 5 then
- put "Error writing output file" into error
- put "Can't create the new file...aborting!" into errMessage
- abortInstall
- else
- if error = "Error : File is busy" then
- put "You must QUIT all applications before running this installer"¬
- into errMessage
- abortInstall
- else
- if error = "Error : I/O Error" then
- put "There was a disk error...aborting!" into errMessage
- abortInstall
- else
- if error = "Error : Folder is full" then
- put "Not enough room in your folder...aborting!" into errMessage
- abortInstall
- else
- if error = "Error : Appleshare insufficient priveleges" then
- put "Appleshare priveleges are set incorrectly...aborting!" into errMessage
- abortInstall
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- if error = "0" then put "No error..." into error
- if error is empty then put "No error..." into error
- if error = 3 then put¬
- "File already exists on user's drive...skipping." into error
- writeLog
- end showError
-
- on writeLog
- global usersVolume,sourceFile,destFile,loopCount,sourceFolder,¬
- destFolder,folderName,erasefolder,error,success,job,SDCount,¬
- buttonName,errMessage
- get cd fld "Log Name"
- put it into logName
- Open file logName
- read from file logName until end
- write job & return to file logName
- write cd fld "SourceField" & return to file logName
- write cd fld "DestField" & return to file logName
- write error & return to file logName
- close file logName
- end writeLog
-
- on success
- play "Hallelujah"
- wait until the sound is done
- end success
-
- on unSuccess
- global errMessage
- play "Buzzer"
- put errMessage
- answer "Installation was Not Successful!!! Reason shown below." with¬
- "OK"
- end unSuccess
-
- on abortInstall
- global usersVolume,sourceFile,destFile,loopCount,sourceFolder,¬
- destFolder,folderName,erasefolder,error,success,job,SDCount,¬
- buttonName,errMessage
- put "Not Successful!!!" into success
- writeLog
- unSuccess
- finishUp
- end abortInstall
-
- on finishUp
- global usersVolume,sourceFile,destFile,loopCount,sourceFolder,¬
- destFolder,folderName,erasefolder,error,success,job,SDCount,¬
- buttonName,errMessage
- put empty into cd fld "SourceField"
- put "Installation finished" into cd fld "Destfield"
- put empty into error
- if success = "Not Successful!!!" then put "Installation NOT Successful"¬
- into error
- put "Installation " & success into cd fld "Misc."
- put "Installation " & success into job
- showError
- if success = "Successful!!!" then Success
- wait 1 second
- put empty into cd fld "Destfield"
- put empty into cd fld "Misc."
- hide cd fld "SourceField"
- hide cd fld "DestField"
- Hide cd fld "Misc."
- show button "Go"
- show button "Cancel"
- show button id 37
- doMenu "Quit HyperCard"
- if success = "Not Successful!!!" then play "DragnetBeep"
- wait until the sound is done
- if success = "Not Successful!!!" then exit to Hypercard
- end finishUp
- </script>
- <background id="2642" file="background_2642.xml" name="Main Background" />
- <card id="3022" file="card_3022.xml" marked="false" name="Card 1" owner="2642" />
- <card id="3883" file="card_3883.xml" marked="false" name="Files Card" owner="2642" />
- <card id="5085" file="card_5085.xml" marked="false" name="Folders Card" owner="2642" />
- </stack>
-