Why does a letter make such a difference?

This script works:
try
tell application "Safari"
activate
end tell
tell application "System Events"
tell process "Safari"
tell menu bar 1
tell menu bar item "history"
tell menu "history"
click menu item "reopen all windows from last session"
end tell
end tell
end tell
end tell
end tell
return true
on error error_message
return false
end try
But try changing the S in the second Safari in the process line to lower case and it won't work. (if you wanna experiment quit safari, and this script is all about bringing back the stuff you were looking at so don't worry about quitting).
Is there a good reason for this or should Apple change it?

I don't know if it's a good thing, but the fact is that process names are case-sensitive, so that two processes, respectively named "Safari" and "safari", could +in principle+ be running at the same time.
To be sure about that, I wrote a very short script that I saved as a stay-open application under the name "safari" and launched while the "Safari" browser was already running. Then I executed the following statement in the Script Editor:
*tell application "Finder" to return processes*
--> {…, application process "Safari" of application "Finder", application process "safari" of application "Finder", …}
Maybe you might find [this article|http://lambda-the-ultimate.org/node/1114] interesting.

Similar Messages

  • Why does HP /compaq make such bad products

    i have had a compaq presario cq56 for a little oveer a year and it seems that as sone as the warranty was over. It started having problems from the keyboard to the system shutting down randomly andc now the battery wont even hold a charge for mre then an hour. I have followed their suggestion on taking care of the battery. /i think this is the worst laptop i have ever owned and I think they engineer them so the fall a part after the warranty is over. And I camt even contactg HP , i cant find an email or anything to send them a message to.

    Thank you for visiting the HP Support Forums. This forum is to leave feedback and suggestions directly relating to these message boards. If you have feedback for HP about their products or services, please use the link below:
    http://welcome.hp.com/country/us/en/wwcontact_us.html
    This is a user-to-user community, and not a venue to receive direct help or feedback from HP. If you have any further questions or concerns, please feel free to send me a Private Message.
    Thanks!
    Wendy M - HP Support Forums Moderator
    Click the Kudos star as a way to say "thank you" for helpful posts.
    Be sure to come back and click the 'Accept as Solution' button on the post that solved your issue - it may help someone else.
    Rules of Participation

  • In Address Book, why does Apple let you create custom fields in the Template cards but not have them available for importing?

    I open Address Book, go into Preferences, select Template and under the Names field (friend, assistant, father, etc) I add a custom field called "Principal".
    I also add two more custom fields in the Email area.
    Quit Address Book then relaunch. Add a new contact and the new custom fields, Principal, etc. are there. All good so far.
    I have a Now Contact file with about 200 contacts in it. I export all fields as a Text file, Tab delimited. No problems there. With Address Book launched, select Import, pick the text file, leave Text Encoding on Automatic and click Open.
    The window that shows the fields for Address Book and fields for the text file side by side opens. This is where you match up the correct fields for importing. If I go to one of the fields from the text file that I created a custom field for, click under the Address Book heading on the Do not import, scroll thru the Apple choices of fields, none of the custom fields show up. Only the original Apple ones are there. Why does Apple let you create them in the Template area but not have them available for importing? Does anyone have suggestions on getting around this?

    While most likely not of interest to you, Spotlight can also tell you where the files it finds are located
    Hover the mouse pointer over the name, and press Command-Option and the path to the file will be displayed.
    As for opening a terminal session in the directory where a file is located, there is Applescripts that do just that as well as specific features in Lion/Mountain Lion terminal:
    <http://stackoverflow.com/questions/420456/open-terminal-here-in-mac-os-finder>
    <http://hints.macworld.com/article.php?story=20110729034827358>
    <http://www.macworld.com/article/1047793/folderinterm.html>
    <http://www.macworld.com/article/1161876/open_finder_folder_in_terminal.html>
    <http://www.macobserver.com/tmo/article/os_x_lion_open_a_folders_location_in_term inal>

  • HT1338 Why does mountain lion make my computer run slow and my Safari too?

    why does Mountain Lion make my computer run slow and my Safari too? Please help!

    The problem is probably not mountain lion. It works just fine on my computer. And a few million others.
    If your computer is having problems, you can try to fix it with some simple troubleshooting maneuvers.
    Take a look at:
    Mac OS X BASIC TROUBLESHOOTING & MAINTENANCE Tips Mountain Lion 10.8 Lion 10.7 Snow Leopard 10.6 10.5 Tiger 10.4 Why How To Tutorials

  • Why does the iPad make the same noise when it connects to a charger that doesn't charge it as one that will charge it???

    Why does the iPad make the same noise when it connects to a charger that doesn't charge it as one that will charge it???
    I would expect that it would make an unusual noise if plugged into a generic USB charger that does not have enough oomph to charge a pad to alert you - otherwise, you might think the noise is reassuring that you are actually charging it.

    I guess my question was actually more of a comment on the (lack of) design!  It is unusual that something like this would still be in an Apple product.  There are wall chargers that have a USB port on them that do not have the required oomph to charge the iPad.  I have one that has two USB ports, one for my iPhone  (it won't charge an iPad), and one for an iPad with greater amperage rating.  I accidentally used the wrong ones for a while yesterday, but noticed before being "surprised" the next morning by an uncharged iPad.  The iPad is smart enough to say "Not charging" by the battery icon when it is plugges in to one of these, so it "knows" - seems like it would be fairly simply to have the iPad make a different or additional noise  wehn it puts up the "Not charging" text icon.  Failsafe user experience?

  • Why does running PDF Maker or Save As PDF cause MS Word 2013 to fail?

    When I run PDF Maker or Save As .pdf in MS Word 2013, the Word program quits - why?forumnotifier
    forumnotifierWhy does PDF Maker not work with MS Word 2013?
    Why does PDF Maker cause Word 2013 to fail?Newsgroup_User

    BizGuru,
    Somethings to consider.
    --| In Windows - the OS needs a goodly space for 'elbow room' - you don't want to have HDD free space drop below something like 15%.
       Say your HDD is 600GB, 60GB free space is leaving you 10%...
    -| RAM - May not be enough; more is better <g>.
    --| Virtual Memory - if in Windows, open up Task Manager. Look at all the "stuff" there. Most is not required by the OS.
        Most of the listing is "stuff" associated with a full cart of processes associated with things you may not need or use but they suck up resources.
    --| Graphics - Processing images into PDF can be resource intensive. Having a dedicated graphics card with enough ram makes a difference.
    Be well...

  • Why does Photo Booth make my camera echo every time I'm video chatting?

    When I am Video Chatting with other people, my camera all of a sudden starts acting weird and echoy. Meaning, every time I dance or get up, it act not good. Please help me with this solution?
    Thank you very much!

    candacefrommontreal wrote: why does photo booth cut my videos short?...
    Because you ********* * ***.
    All you have to do to make it work is **** ** ******* ****.
    Or: http://discussions.apple.com/message/13305215#13305215
    Message was edited by: EZ Jim

  • Why does apple let you install the update if it's just going to fail?

    I got the 3GS maybe a month ago. I had issues running updates on my old iphone (the original) and used to have to go into apple's genius bar in order to do updates. I was sort of hoping that the updates would run fine on the 3GS, but 3.1.2 failed for me.
    Anyways, it gave me some error code and I followed the link to kb article TS1275: http://support.apple.com/kb/ts1275
    From there I discovered that port 443 wasn't open on my computer and that was probably the problem. So I opened it up and I'm trying to run the update again (although so far nothing is happening).
    My question is this: why would itunes let me try to run the update at all if I didn't meet the prerequisites? Since the update is obviously going to fail if port 443 is closed, why doesn't it verify that I have the port open before it tries to update?
    I'm just a little peeved that I have to drive an hour to go see the geniuses (yet again).

    I heart my ringtones! And I heart my iPhone too..
    Just a lil' humor..
    You can do 1 of two things..
    1-Call At&t to make your ringer longer
    2-Or you can try it yourself... (Found on another forum)
    The following codes should allow you to control the delay from 5 to 30 seconds on any GSM phone:
    * Status: *#61#[SEND] The status will report the delay (5, 10, 15.., up to 30) & the number where your calls are diverted if there is no answer.
    * Activate: *61*[number]*[delay]#[SEND] Use the number that was reported by the status & the delay can be set to (5, 10, 15, 20, 25, or 30) seconds.
    * Cancel: ##61#[SEND

  • Why does my mouse make blank spaces on my screen as I move it?  It started happening after I downloaded Mountain Lion

    Why does my mouse sometimes cause my screen to erase as I move it?  It started to happen after I downloaded Mountain Lion.

    You could try booting into Safe Mode to see if it fixes the problem. To get out of Safe Mode, restart as usual.

  • Why does klibc make such a difference for v86d?

    I decided to use uvesafb again, having built it for the first time in 2010. However, it gave a horribly corrupted image with v86d from the repos. The only way I can get the console to look as good as it did in 2010 is to link v86d against klibc. Making the klibc-2.0.2 package for that purpose today was really annoying.
    Before Arch used busybox, some things *needed* klibc. They would simply crash if you tried to link them against glibc and run them in early userspace without the root directory being mounted. But I'm at a loss for what is going on here -- v86d runs with or without klibc but having it linked to klibc makes it better (at least on an old ATI Rage Mobility M3).

    I don't know if it's a good thing, but the fact is that process names are case-sensitive, so that two processes, respectively named "Safari" and "safari", could +in principle+ be running at the same time.
    To be sure about that, I wrote a very short script that I saved as a stay-open application under the name "safari" and launched while the "Safari" browser was already running. Then I executed the following statement in the Script Editor:
    *tell application "Finder" to return processes*
    --> {…, application process "Safari" of application "Finder", application process "safari" of application "Finder", …}
    Maybe you might find [this article|http://lambda-the-ultimate.org/node/1114] interesting.

  • Why does it let me erase only one cookie at a time, or all cookies at once, and not let me select multiple cookies that I want to delete?

    Do you not realize that there are HUNDREDS of cookies in the Cookie Jar? I want to save SOME of them (banks, stores, Facebook, etc.) but get rid of the rest. Why have you made it so that I can't click & drag (or otherwise select) multiple cookies for deletion? You're going to make me delete them one at a time? What could possibly be the reasoning for such a decision? Or is it an oversight?

    The last Firefox version that runs on Mac OS X 10.4 is Firefox 3.6.28.
    Current Firefox versions require a Mac with an Intel processor and OS X 10.6 (Firefox 16 runs on Intel Mac OS X 10.5).
    *http://www.mozilla.org/firefox/22.0/system-requirements/
    For an unofficial Firefox 17.0.7 ESR compatible version (TenFourFox) that runs on a PowerPC Mac with OS X 10.4.11 or OS X 10.5.8 you can look at:
    *http://www.floodgap.com/software/tenfourfox/
    *http://www.macupdate.com/app/mac/37761/tenfourfox
    *http://code.google.com/p/tenfourfox/wiki/ReleaseNotes1707
    See also:
    *http://code.google.com/p/tenfourfox/wiki/PluginsNoLongerSupported
    *http://code.google.com/p/tenfourfox/wiki/QuickTimeEnabler
    *http://code.google.com/p/tenfourfox/wiki/AAATheFAQ

  • Why does time machine make a second/different backup after new installing a hard drive?

    Hi all,
    Long time reader, first time poster...
    after having to install a new hard drive on my MacBook Pro, the new Time Machine backups are not recognising the original/older backups on the external hard drive connected via network router and has created a new/second backup caller 'xxx Mac Book Pro 1' instead of updating/reading the orginal 'xxx Mac Book Pro backup'?
    Does anyone know why it did this? and more importantly how do i make it recgonise the original and stop making the secondary copy?
    Thanks!

    Hi gb69,
    If you are having issues with Time Machine backups after a recent hardware change, you may find the following article helpful:
    Time Machine: Troubleshooting backup issues
    http://support.apple.com/kb/ht3275
    Regards,
    - Brenden

  • Why does my macbook make a funny noise when I open it?

    After my macbook pro has been on the charger for some time & I open it up, it will make a funny noise & the screen will be blue with a bar on it.  Takes a little bit before I can use it,  Does anyone know what is wrong?

    rjwalker105 wrote:
    I quit all applications & close the lid.  I usually use the charger all time.  If I leave it unplugged from the charger, it will not do this.  It will make a whirring noise & the screen will be blue over my background, will have a bar on it like it is loading.  Then will finally let me use the curser after a few seconds.  Only had the macbook for about 4 months.  It started doing this about 2 month after I bought it.
    If you are still under warranty and/or have AppleCare, call them.  Let them deal w/it.
    Before calling them, try the following first:
    http://support.apple.com/kb/HT1411 Apple Portables: Resetting the System Management Controller (SMC)
    http://support.apple.com/kb/HT1379 Resetting your Mac's PRAM and NVRAM

  • Why does my safari make my fans un so high on my macbook?

    i keep having to go to the activity monitor to close down the safari prosessor to get my fans to keep from running on high, normally when i have to quit the prossesor it says it is running in the high 90's and sometimes even at 100,
    why is it doing this and how can i make it stop (if possible)?

    This is something that keeps coming up--some process runs wild and hogs the CPU and you have to quit it. Often it's a printer process, but it could be anything. Usually quitting it once is enough. But if it is happening repeatedly with Safari, there must be a reason. You could try emptying the cache and see if this helps. If not, you could try resetting Safari. If no joy you could even consider reinstalling Safari.
    It sounds like Safari is going into some sort of loop and hanging up. With luck, emptying the cache will clear it.
    Good luck!

  • Why does apple only make 32 and 64 gb ipod 5's? The price went up, so i cant afford a new one

    Why?

    Apple, like a lot of companies, does market analysis to determine what the buyers want.  Products are then manufactured to satisfy the largest majority of customers...they have to make economic decisions about the numbers of products based on predicted sales.  So, the larger storage devices are what their market decisions said should be provided.

Maybe you are looking for

  • Copying CUSTOMER_H data from SDCR to SDHF document.

    While creating SDHF from SDCR, I want to copy all the values of CUSTOMER_H structure from preeceding document to next document. I used ORDER_SAVE~PREPARE BADI but it does not update the custom structure. The psedo logic is: 1. Get SDCR document GUID

  • Help:  hard wiring MAC MIni to Linksys wrt55ag wirelss router

    I hope someone can help me with this, it is driving me nuts. I have a mac mini that is hard wired to a Linksys wrt55ag wireless a and g router. To make thinks worse. I have a linksys voice over IP box. I can get it to work but i keep losing the conne

  • NullPointerException from generated code? (WLS81SP2)

    We are receiving an NPE, and looks like it is coming from the generated code. Most oddly, it is intermittent; repeating the operation that causes the error often succeeds. Any thoughts? Here is the stack trace: 2005-09-12 17:21:31.273 | payprocess.Pr

  • BOM component Quantity

    Hi All Gurus, How can i get bom quantity at the time of confirmation in CO11N?

  • Customize SLES collector

    Hello, I'm trying to add support for Freeradius to the SLES collector by adding a parse-radiusd function to a custom.js file. A couple of questions: 1) What is the proper way to extend the taxonomy.map file? Right now I'm adding all XDAS data in cust