• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
folder action help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

folder action help


  • Subject: folder action help
  • From: Adam Tabak <email@hidden>
  • Date: Tue, 27 Feb 2001 16:08:35 -0500

Would someone please figure out why the following Folder Action isn't
working:

on opening folder (daFolder)
try
set oldId to AppleScript's text item delimiters
set AppleScript's text item delimiters to ":"
set fName to the last text item of (daFolder as string)
set fileName to "password-" & fName
set theAlias to "iBook HD:System Folder:Preferences:password:" &
fileName
set rNum to (open for access file theAlias with write permission)
set fileeof to (get eof rNum)
if fileeof < 1 then
set newpass to the text returned of (display dialog "Choose a
password for folder " & fName & ":" default answer "" buttons "OK" default
button 1)
write newpass to rNum
end if
set reqPass to the text returned of (display dialog "Enter password
to open folder " & fName & ":" default answer "" buttons "OK" default button
1)
set fileeof to (get eof rNum)
set realPass to (read rNum to fileeof)
if reqPass is not realPass then
display dialog "Wrong!" buttons "Oh poo" default button 1
tell application "Finder" to close window fName
end if
close access rNum
on error
display dialog the result buttons "OK"
end try
end opening folder

Thanks,
Atomm

http://www.spazum.net/


  • Prev by Date: Re: global variable not being recognized by script object subroutine
  • Next by Date: Re: global variable not being recognized by script object subroutine
  • Previous by thread: Re: Breaking AS
  • Next by thread: Re: folder action help
  • Index(es):
    • Date
    • Thread