Another AppleScript question

How would one make a password, let me explain more about this,
So pretty much I have it where you enter and set a password; it's all good.
So my question was how would I make it so it opens up a dialog after you set it telling you to enter the password you just set, if it's wrong it'll tell you to write it again, if it's right it'll open up whatever I put, here is my current code.
property firstRun : true
if firstRun then
    set pass to text returned of (display dialog "Choose your password." with title "Pass Select" default answer "" buttons {"Cancel", "Select"} default button 2 with hidden answer)
    set firstRun to false
end if
Thanks to everyone who replies to this and helps me.

Here:
property firstRun : true
property the_pass : ""
if firstRun then
set the_pass to text returned of (display dialog "Choose your password." with title "Pass Select" default answer "" buttons {"Cancel", "Select"} default button 2 with hidden answer)
set firstRun to false
else
set pass to text returned of (display dialog "Provide the password." with title "Pass Select" default answer "" buttons {"Cancel", "Select"} default button 2 with hidden answer)
repeat
if pass is the_pass then
exit repeat
else
set pass to text returned of (display dialog "Incorrect password." with title "Pass Select" default answer "" buttons {"Cancel", "Select"} default button 2 with hidden answer)
end if
end repeat
end if
(102371)

Similar Messages

  • Another newb question: multiple virtual servers

    Hi, I have yet another ignorant question. I have several unrelated web projects that I am working on, and I would like to be able to set up a virtual server for each one for testing purposes, such as: http://project1, http://project2, http://project3. Can someone tell me if this is doable, and if there are any tutorials/resources on this for someone who has 0 experience running a web serer? Sorry for being so ignorant!

    Yes, it is doable.
    You can setup virtual server either by IP or by name.
    If you have one IP, and want to set them up by name (ex. http://project1, http://project2, http://project3) you can do so easily with this type of configuration:
    <virtual-server>
        <name>mydomain</name>
        <http-listener-name>http-listener-1</http-listener-name>
        <host>*.mydomain.com</host>
        <document-root>/www/domain</document-root>
      </virtual-server>
      <virtual-server>
        <name>myotherdomain</name>
        <http-listener-name>http-listener-1</http-listener-name>
        <host>*.myotherdomain.com</host>
        <document-root>/www/myotherdomain</document-root>
      </virtual-server>
    ....The important part here is that
    a) all virtual servers share the same HTTP listener
    b) which virtual server serves the request depends on the $HOST request header send by the client. Sun Web Server does the matching for you. It will match $HOST vs. the virtual server's host attribute. Depending on which site you connect to the right virtual server will be used.
    c) if the $HOST request header does not match any of the virtual servers, then the default virtual server defined in the HTTP listener will be used.
    To create a virtual server, use the Admin GUI, access the configuration, and then add new virtual server. Or use the following CLI command.
    wadm> create-virtual-server --config=myconfig --http-listener-name=http-listener-1 --document-root=/www/docs/myserver.com --host-pattern=myserver.com --log-file=../logs/myserver.com-error_logs myserverHost pattern will be used for matching. Some of this elements might be optional.
    Hope that helps. And keep the questions coming :D
    Edit: Also check the documentation
    Using Virtual Servers in SJS Web Server 7.0

  • Another simple questions

    Hello friends:
    Another simple question: I need to learn things about Oracle on my desktop.
    My machine runs Windows 98. Oracle has some desktop product of its Database Line?
    For example: Oracle Personal?
    And Oracle Lite? What's the main difference between Oracle Personal and
    Oracle Lite?
    Thank You
    Gracias
    Ing. Pablo Romero
    CORDOBA ARGENTINA

    1. I didn't know the answer to your first question, but I googled it and it says the item is the in-call audio boost.
    http://forums.crackberry.com/f71/flag-icon-47659/
    2. isn't this setting determined by the carrier? So it's not a setting in the phone, but when you call in to your voicemail you can change your options?

  • Yet another Applescript file renaming question...

    Hi all,
    Well, having been a full-time Applescripter for five years at Apple, I thought it would be easy to dust my chops off and write a simple script to get a file name from one folder and paste that name onto a file in another folder.... but I guess 15 years of no-scripting has proven too much of a challenge to my aging brain... and I am on a time crunch to get this done for my client.
    SO, here is what I'm hoping to get help with.  I have no doubt it is pretty simple.
    File "A" is in a folder.
    File "B" is in a different folder.
    I need to GET the name of File A and use it to rename File B.
    Can one of you youngin's take 30 seconds and help an old dude out?
    Thanks a bunch,
    matt

    Niel... almost there.
    The script works perfectly (with me placing the path instead of just the folder)... thank you so much.
    One extra thing though... I didn't realize that the files are different file types (jpg and psd).
    So what do I need to do to change the name without changing the file type?
    THANKS again!
    Matt

  • Another mail applescript question...

    Hi again!
    I just posted a topic about how to auto-reply in Mail with an attachment by using Applescript and rules in Mail. I figured I should be able to do this via Applescript but I am having a problem. Nevermind the attachment for the moment but I can't even get a message to send. Take this example:
    tell application "Mail"
    make new outgoing message with properties {visible:true, subject:"My Subject", content:"My Body"}
    end tell
    If I run this in Script Editor it prepares a new message (although not yet sent). If I attach this to a rule in Mail nothing happens. As a test I changed the script to simple say display dialog "test" and it does work. So my rule in Mail.app is ok but when I use this simple script above nothing happens. I hope this makes sense and someone can help me to set up a rule in Mail that triggers a Applescript which will send a message...thank you!
    Reg

    Hi again VK!
    Yes I do understand and maybe it's an error on my part but I couldn't get it to work. What I'm doing now is I use an applescript to gather the sender of the incoming message and save it to Address Book. Then I tell that applescript to launch a separate applescript saved as app to send a message to that same person using the info stored in Address Book. It's a bit sloppy too but it works. Occasionally though it seems to send out a blank message??? I will try to experiment more when I get the chance. Hopefully Apple will just fix this bug in 10.5.4???
    Thanks again,
    Reg

  • Another Applescript with Excel Question

    Hey Everyone,
    I am making an attempt to write a script for excel. I need the script to do these things:
    Open an excel workbook file from a dialog
    Give me an option to enter a name to search for within that document
    search column D of that document for the name entered
    each time it finds the name in that column, copy that whole row
    copy all of the rows it finds to a new excel workbook
    I have figured out the really basic things(open the file, display the dialog to enter the name in, etc.) I just am not sure how to tell it to search only column D and how to copy the  whole row of each entry it finds.
    Any help offered, I will appreciate!

    MacTech magazine has a tutorial for using Applescript with Office 2008.
    Here is the best I can come up for it. The links to MacTech no longer work. I'm not sure if you can find a way to get to it any more:
    http://gigaom.com/apple/mactech-offers-free-scripting-book-for-office-2008/
    And yes, they are much like macros, without the possibility of malware being embedded.

  • Ical Applescript questions and missing commands

    This is an advanced itunes question....
    I am using itunes with ical and applescript to run a radio station.   I have used alot of things from Doug Adam's and taken some things past where i can get help.   I am using itunes 7...and os X 10.5.8 .   i am also using ical buddy, gcal(for xml) and a few other neat little tricks.  
    I have run into a few technical problems and was wondering if anyone knew how to fix them.
    1 Problems happen:    is there a way to disable ALL pop-up warnings in itunes........not just sync, or playlist warnings, but all errors that require someone to click......
    2 is there a way to Toggle (on/off) itunes soundcheck in the preferences when you set a playlist to play with an applescript
    Thank you,
    Jacob Bouchard
    www.wfku.org

    I  have updated to Itunes 10.4, and have encountered a whole new set of problems
    1. (solved)  the popup warnings in Itunes 10.4 are gone.   I have a good backup applescript that forcequits the applescript app, or forces a return Key press into the warning window.   It works but i want to make it better
    2. (solved)   I have solved the soundcheck problem with an applescript (its not pretty, but does the job)
    NEW PROBLEM:
    upgrading to Itunes 10.4 removed the *Smart shuffle features that were in Itunes 7.6.   (this is much different from smart playlists)  
    I NEED THAT FEATURE
    Can someone at apple please give me the Hexidecimal code  i need to replace in the com.apple.itunes prefs file that will re-orient the smart-shuffle  to *shuffle "Songs"  with "least likely artist repeat" Setting
    Thanks in Advance,
    Jacob
    *Removed in iTunes 8
    also as a sidenote iCal version 4.04 is doing something shady when i export the event information.   It feeds garbage into my code which creates errors apparently at random.   The problem is resolved with earlier and later releases of iCal (That i cannot use becuase i have a Macbook pro 2006 Intel Duo core which will not take the lion operation system)   Sometimes it feeds garbage after the ical information that my shellscript is requesting

  • ICal questions, maybe going into applescript question

    Hello, I am trying to create a recurring ICAL event with different titles for a time period.  It is simple, I want on monday of everyweek tor 7 monthes to read, week1, week2, week3 etc.  Is this possibe in ICAL, or possible via applescript (beginner applescripter)? 
    Thanks!

    All do-able in DVDSP... and pretty easy to do as well.
    You can create the menus with links to the chapters in your track (which will play the chapter and then continue), you can set the chapters into stories and point the menu buttons to those instead and you can set each story to go back to the right menu.
    You can then point a play all button at the track itself, which will then play all... which hopefully answers mish's question as well as yours.
    Much of this is in the tutorials that come with DVDSP, and it is well worth your time going through those if you haven't already moved up to DVDSP. There is a lot of help available on this forum as well, mind you!

  • Another BW question about filter in the query definition

    Hi ,
    I have another question about filter in the query definition.
    <u>Question:</u>
    Which of the following objects can be filtered in the query definition?
    A. characteristic
    B. Key figure
    C. Structure
    D. Units
    E. Hierarchy
    My answer is A,B,D,E.
    The answer in the book is A,B,D
    Can anybody tell me which one is wrong?
    Thanks in advance,
    Liu Jia

    HI
    1.The answer could be A,B,D.you can not apply filters on hierarchies
    2.Whenever there is a change in Attribute data(like Location,Num etc...)that has to be reflected in all aggregates of the cube.Thsi can be done by running "ATTRIBUTE CHANGE RUN".
    sri

  • Yet another standby question...

    Hi gurus,
    Please help to resolve the quiz. I have completed manual physical standby installation. It is up and running. I then decided to install Grid Control and to use Data Guard for the standby creation. I've successfully installed GC, deployed all agents, I can see my previous standbys, life is good in short. Now, when I am trying to create the second standby for my production database using the Data Guard I stuck on a logical question:
    On the step 3 of Data Guard standby creation, there is a note, saying:
    The instance name (also referred to as the SID) must be unique on the standby host.
    Yeah, fair enough. But i can't understand what should I do next? I have:
    db_name YELLOW - primary prod
    db_name YELLOW - standby prod 1st
    and i need db_name YELLOW - standby 2nd
    But I can't create it on the same server where the first standby resides.. What options do I have? Do I need to create the second standby on another server? Do I need to kill 1st standby? Is there any way to avoid this conflict? I am confused. I have no equipment for TWO standby servers... I thought I can install there up to 9 standbys.. But it seems to be a problem.. And definitely, I cannot give my second standby other name than YELLOW as all my applications are strongly tied on db_name...
    Friends, please clarify this if you can. I am kinda lost in here..
    Thanks as usual,
    Maria

    well, that's a good question! :)
    because I don't have spare server for the standby. the question is not about: 'should I or should not put more than one standbys in one server' , but more about: 'is there any way to put two standbys with the identical db_names in one server'. I know that I probably sound unprofessional, but I just wanna know.. If the answer is 'no way', I will kill the first standby then and recreate the second one using DG with the correct name.
    Thanks for writing to me,
    M.

  • Re: another build question! (sorry lol)

    Hi all
    right, after days and days of researching all the excellent articles on here ive had to write a post! So apologies for going over old ground
    Im going to build a new CS5.5 rig (having had a guts full of Apple and their FCPX fiasco its back to pc!)
    so although i appreciate the 990x o'c is prob best option, bang for  buck is leading me down the sandybridge i7 2600k o'c option on p67 mobo with 16gb of ram (option to take to 32 down the line when the chips are out)
    anyway, im sorted on chip mobo (msi big bang marshal p67), nivida 570 etc , its the drives im struggling on!! Im edit avchd video and some after effects, small amount of 3d, and in FCP i always transcoded everything to prores. Now on cs5.5 it looks like real time performance is possible with high end hardwear.
    So mobo, ram, and chip aside, my HDD config im unsure on, ive not really got the cash to go crazy with raid controllors etc, but understand need for seperate drives, etc and tbh might even go downt he cineform route as a prores alternative (prob avoiding hassles of drive speed with avchd)
    im thinking as the SSD's are now dropping in price and the ocz are producing these 500 mb r/w speed sata 6 120gb drives for a reasonable price, would 3 of these drives (one for os, one for media , one for scracth disk ) be a good set up or is it a waste of cash and should i raid 0 from bios/mobo?
    I appreicate that 120 gb drives for media etc are small, but i would take project media from another much large backup drive and just use the 3x ssd set up as working disks for editing & os? once project over, clear out drives to larger back up and start new project!
    Its either that or i go SSD as bootdrive, but some sort of cheap raid set up for my scratch disk, media drives? prob is if i do that, from what ive read (brain dead now) i would be best off with 2 x raid 0 as scratch disk and orginal media respectively when workign with avchd
    HOWEVER, on my mobo there are only 4 sata 6 ports, so if i use one for ssd boot drive, and then im left with 3 x sata 6 ports and another 4 x sata 3 ports to raid on? how does this work? any point in getting the sata 6 drives as one would be stripped with a sata 6 drive plugged into a sata 3 port (this was my reasoning behind using 3 small sata 6 ssd's plugged to the sata 6 ports  and rest of sata 3 ports as storage and backups!
    confused lol!! I just want the overclocked sandybridge system with decent gpu card, as much ram as possible at present, but im thinking my bottleneck will be in the HDD config! any suggestions are much appreicated! im not that techy so whilst have read all the articles am more confused now (plus normally a mac user, so its out of the box configuration usually!) for what its worth looking to purchase something from scan uk in terms of parts! total build cost including a reasonable screen £2,000
    many thanks

    You have a limited budget, especially in the UK, but then don't we all?
    Going for the 980X will triple the cost of the CPU, but even when editing AVCHD material the gains are not sizable enough IMO to justify that cost differential. Add to that you will need 24 GB instead of 16 GB and that carries an additional price tag. Both factors will easily move you out of budget range if you want to have a number of disks and possibly a raid controller.
    Did you read my article To Raid or not to Raid, that is the question. It can be found under the Overview tab at the top of the page? (Currently responding from abroad on my notebook and not having the bookmarks available for easy linking). http://forums.adobe.com/thread/525263
    With media and projects I would advise against a raid0, because of the lack of redundancy. For pagefile, media cache and previews (scratch disks) raid0 is quite OK. They will be recreated if needed. The performance gain from a raid0 for media and projects over a parity raid is easily offset by the time spent on making backups. For parity raids do not use WD Caviar Blacks, but look at the Hitachi 7K3000 line of disks.
    The question of Sandy Bridge versus the old X58 platform is essentially one of 'which limitations are acceptable to me'.
    The Sandy Bridge is a great processor and at least the equal to the old i7-9xx quad cores. However, the platform, the chipset, has its shortcomings in terms of PCIe lanes. Whether that is relevant to you, only you can decide. But hey, we would be in serious trouble if Intel did not manage some progress in two years time from the i7-920 to the i7-2600K. So of course the i7-2600K shows much more potential than the almost retired 920, it is the chipset for the Sandy Bridge that is 'flawed' in comparison to the X58, but that is no surprise, since the Sandy Bridge is a 'middle-of-the-road' platform and the X58 was a 'high performance' platform.
    BFTB-wise I think that within your budget limits, you should look at the i7-2600K, but with the best disk setup you can afford.

  • Another Noobie question - readLine()

    Hi all
    This is another one of the extreme noob questions. I wrote a small program to read form a text file
        String NetworkLine = new String();
        try{
            FileReader inputFile = new FileReader("Test.txt");  //
            BufferedReader in = new BufferedReader(inputFile);
           try{
               while (in.readLine() != null){
                NetworkLine = in.readLine();
                System.out.println(NetworkLine);
           }catch (IOException e){
                System.err.println("Error in reading the file");
        }catch (FileNotFoundException e){
            e.printStackTrace();
        }My Test.txt is
    One
    Two
    Three
    Four
    Five
    Six
    without the *
    The output I get is
    Two
    Four
    Six
    I cannot figure out why only even no. lines are being read. I inserted a breakpoint at the line
              System.out.println(NetworkLine);This shows me that only even no. lines are being read by readLine(). Any help will be appreaciated.
    Thanks
    Ayesha

        String NetworkLine = new String();
        try{
            FileReader inputFile = new FileReader("Test.txt");  //
            BufferedReader in = new BufferedReader(inputFile);
           try{
               while (in.readLine() != null){  // <-- This reads a line, checks it for null ,and drops it
                NetworkLine = in.readLine(); // <-- this reads the next line
                System.out.println(NetworkLine);
           }catch (IOException e){
                System.err.println("Error in reading the file");
        }catch (FileNotFoundException e){
            e.printStackTrace();
        }So the upshot is that you print every other line.
    Corrected:
        String networkLine = new String();
        try{
            FileReader inputFile = new FileReader("Test.txt");  //
            BufferedReader in = new BufferedReader(inputFile);
           try{
               while ((networkLine = in.readLine()) != null){
                System.out.println(networkLine);
           }catch (IOException e){
                System.err.println("Error in reading the file");
        }catch (FileNotFoundException e){
            e.printStackTrace();
        }

  • Another beginner question about targeting functions

    I've read what I thought was an excellent thread about scope in EA, but I'm still not getting some of the basics (btw the thread was http://forums.adobe.com/message/5287753#5287753).
    I have "slides" in the symbol library and in the main composition compositionReady script I've set up a generic script for playing back sound. That script works fine when I bind it within the compositionReady script to a symbol and click, so I know the funciton itself is fine. My question, I'm programmatically loading the slides from the library as I go along and want to use the generic function I created in the compositionReady script, but I can't seem to create the proper syntax to call the script. Here's some that I have tried. What is the correct syntax? The script is on frame inside the slide symbol.
    //sym.getComposition().getStage().playSound();
    //sym.getComposition().playSound();
    //Edge.getComposition("CER_1").playSound();

    Thanks for having a look. Yea, it's getting to the script fine but it doesn't like the syntax. Console always indicates javascript error, which is what happens when Edge throws an exception because it doesn't know what to do. The article that Elaine posted on above gives me the sense that it might be best to change the function to a variable, then it would be in scope to call but I have parameters I'd like to pass with it and I don't think  I can pass a parameter with to a variabalized (word?) function. I know it's just me moving from ActionScript to Edge JavaScript and scope. Whereas I could always find a homebase in ActionScript with the stage, it seems that the stage in Edge is just another symbol and calling a function within the stage is never getting there. Elaine hints at putting outside the stage closure and it would be accessible, which, of course, has led me to start readying JavaScript books and learning more about scope etc. It seems like that is life as a developer. I  dont' get that, oh, better take a day or two to  understand that concept, oh, that function works now, next problem. ;-)

  • Another excel question

    hi,
    I read an excel file like this:
      CREATE OBJECT gv_excel 'Excel.Application'.
      SET PROPERTY OF gv_excel 'VISIBLE' = 0.
      CALL METHOD OF gv_excel 'Workbooks' = gv_books.
      CALL METHOD OF gv_books 'Open'
        EXPORTING
          #1 = p_file
          #2 = 1.
      FREE OBJECT gv_cell.
      FREE OBJECT gv_excel.
      FREE OBJECT gv_books.
      FREE OBJECT gv_sheet.
      CALL METHOD OF gv_excel 'QUIT'.
    the question is, why the excel process is not kill in the task manager?
    joseph

    Hi ,
    i think Rich is right.
    another problem could be if you've used an object to
    save your data:
    like :
    CALL METHOD  OF H_EXCEL 'Save' = h_save.     
    so you've to free this too:
    FREE OBJECT H_save.    
    regards Andreas

  • Windows 7 Another Preorder Question :)

    Ok bestbuy.com has taken out the 108$ deposit and now the order is confirmed so does
    bestbuy.com hold the Funds and use them when it ships or can i use the 108$ for something
    else now since the order is done and i Can just put another 108$ in there for them to take it 
    out on 10/22/09 the release date or when it ships
    i need to know if i can do this thanks 

    Well you can purchase either an upgrade or a full copy. Difference is, one has to be upgraded from a previous operating system (XP or Vista) and the other can do a clean install without the need to have a previous operating system. The Windows 7 Upgrade program provides you with an upgrade copy of Windows 7.
    Adam
    Best Buy Community - Retail, Americas
    Forum Guidelines | Terms & Conditions | Community Guidelines | Blogging Guidelines
    *Remember to mark your questions solved and click the star under the user's name to show your thanks!

Maybe you are looking for