make an application ask for password applescript -


i'm trying write applescript code makes firefox ask me password when open it. got, somehow doesn't work:

on activate display dialog "please enter password" buttons {"cancel", "okay"} default answer "" default button 2 set x text returned if x "password"     tell application "firefox"         activate         reopen     end tell else     "please try again" end if end activate 

i need know save script, when correct. lot!

there error in set x text returned. needs know dialog you're referring to. see below.

on activate set passwordrequest display dialog "please enter password" buttons {"cancel", "okay"} default answer "" default button 2 set x text returned of passwordrequest  if x "password"     tell application "firefox"         activate         reopen     end tell else     "please try again" end if end activate 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -