i have a single user password protect script working. I have ben trying to make it a multi user script tho so i can have 2+ people use the same login that then leeds to different sub-scripts for each> plz help ive ben stuck for weeks!!!
set user1 to "username"
set pass1 to "1234"
ignoring case
ignoring white space
if text returned of (display dialog "Enter Username" default answer "" buttons ("continue") default button 1) is equal to user1 and text returned of (display dialog "Enter Password" default answer "" buttons ("Login") default button 1 with hidden answer) is equal to pass1 then
say "access granted. welcom back Mr. Petrosky"
--insert target script here
else
say "access denied"
if text returned of (display dialog "Enter Username" default answer "" buttons ("continue") default button 1) is equal to user1 and text returned of (display dialog "Enter Password" default answer "" buttons ("Login") default button 1 with hidden answer) is equal to pass1 then
say "access granted. welcom back Mr. Petrosky"
--insert target script here
else
say "access Denied"
if text returned of (display dialog "Enter Username" default answer "" buttons ("continue") default button 1) is equal to user1 and text returned of (display dialog "Enter Password" default answer "" buttons ("Login") default button 1 with hidden answer) is equal to pass1 then
say "access granted. welcom back Mr. Petrosky"
--insert target script here
else
say "access Denied"
tell application "Finder"
do shell script "kill -15 `ps ax | grep -i loginwindow | grep -v grep | cut -c 1-6`"
end tell
end if
end if
end if
end ignoring
end ignoring
the unix shell script is for a farce logout.
plz help!!!