I kind of new to applescript, especially os X so here are a few questions:
¢How do I get my password gate to work??? I think it shuld work but I can’t find any way of fixing its bugs. I open the folder and…NOTHING HAPPENS! here’s the code:
property Pass_Char : "§" --Set to the pass folder prefix.
on opening folder this_folder
set dis_fldr to list folder this_folder
repeat with i from 1 to 10000
set fldr to (item i of dis_fldr)
if the first character of fldr is Pass_Char then
exit repeat
end if
end repeat
if the first character of fldr is not Pass_Char then
display dialog "You have no pass folder!" buttons {"OK"}
tell application "Finder"
close window this_folder
end tell
return "user cancled"
end if
display dialog "This is the folder passgate; Select password type." buttons {"Normal", "Secure"}
set button to the button returned of the result
if button is normal then
set boln to "false"
else
set boln to "true"
end if
repeat with i from 1 to 1000000
if boln is false then
display dialog "Please insert password:" default answer "Password" hidden answer "false" buttons {"Hide", "Cancel", "OK"} default button "Hide" cancel button "Cancel" with title "Password" with icon "stop"
set button to the button returned of the result
set pass to the text returned of the result
else
display dialog "Please insert password:" default answer "Password" hidden answer "true" buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel" with title "Password" with icon "stop"
set button to the button returned of the result
set pass to the text returned of the result
end if
if button is "Hide" then
display dialog "Password is hidden. You may type in THE REST of your password into the secure box below, or click 'all clear' to continue normally." default answer "" buttons {"Show", "OK"} default button "OK" with title "Hidden" with icon "caution" with hidden answer
set button to the button returned of the result
set pass2 to the text returned of the result
set pass to "§" & pass & pass2
end if
if button is "OK" then
else
return "user cancled"
end if
end repeat
if pass is not fldr then
tell application "Finder"
close window this_folder
display alert "You may not view this folder!" message "Password incorrect." as "warning" buttons "OK" cancel button "OK" giving up after "10"
end tell
end if
end opening folder
(done)¢Also, I want applescript to make an alias of a folder. Not the applescript alias, but an icon with the text in italics that leads to the main folder. Can this be done?
If you bother to read this far, I am very gratefull. If you respond, thats even better. Thanks in advance, Fisto.