make an application ask for password applescript
-
I'm trying to write an AppleScript Code which makes Firefox ask me for a password when I open it. This is what I got, but somehow it doesn't work: on activate display dialog "Please enter your password" buttons {"Cancel", "Okay"} default answer "" default button 2 set x to text returned if x is "Password" then tell application "Firefox" activate reopen end tell else say "please try again" end if end activate I also need to know where to save the Script, when it is correct. Thanks a lot!
-
Answer:
There was an error in the set x to text returned. It needs to know what dialog you're referring to. See below. on activate set passwordRequest to display dialog "Please enter your password" buttons {"Cancel", "Okay"} default answer "" default button 2 set x to text returned of passwordRequest if x is "Password" then tell application "Firefox" activate reopen end tell else say "please try again" end if end activate
Collin Alpert at Stack Overflow Visit the source
Related Q & A:
- How to make a Daemon application?Best solution by Stack Overflow
- How to make a Windows application?Best solution by Stack Overflow
- What is a good thing to put on a job application when they ask whats the reason for leaving the position?Best solution by Yahoo! Answers
- How should I ask for a job application?Best solution by Yahoo! Answers
- How do I make an Application Stand out?Best solution by eHow old
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.