Why can't I end if in this AppleScript?

Hello,
Could you take a look at this script and explain why I can't end the if? I have tried compiling it with out the if and everything compiles so I know it is not a Syntax Error with the rest of it. But as soon as I enter and compile the end if portion of the script I receive the Syntax Error message;
Expected end of line, etc. but found “if”.
After the error message the if directly after end is highlighted in blue. Any ideas? Here is the script;
tell app "Finder"
-- get reference to folder whose contents are shown in the window
set the target_folder to the target of the front finder window
-- make a set of folders, one for each month
set the month_titles to {"01 January", "02 February", "03 March", "04 April", "05 May", "06 June", "07 July", "08 August", "09 September", "10 October", "11 November", "12 December"}
repeat with i from 1 to 12
set the month_title to (item i of month_titles)
if not (exists folder month_title of the target_folder) then make new folder at the target_folder with properties {name:month_title}
end if
end repeat
-- find the documents in the folder
set these_files to (every document file of the target_folder)
-- move each document to its corresponding folder
repeat with i from 1 to the count of these_files
set this_file to item i of these_files
set the creation_month to (the month of (get creation date of this_file)) as string
move this_file to (the first folder of the target_folder whose name ends with the creation_month)
end repeat
end tell
Please help, and I hope you have a great day.
dofromon
these_file
set the m

Hello Niel,
Thank you for taking the time.That must have changed since this book was last published. Also, I apologize, I should have selected this solved my problem instead of this helped me. If you post back with the same answer I will rectify this. Thank you again and I hope you have a great day!
dofromon

Similar Messages

  • Why can I not make purchases from this computer?

    When I try to make an I tunes purchase from this computer I get a notice that I can not and referring me to this site. This computer is authorized and my account is up to date and I have no problem from my other computers.
    I would sure like to speak to a warm blooded voice.

    I'm having this problem on my iPhone and iPad when trying to purchase

  • What is ValidAssert()?  Why can't I find docs for this class?

    I'm reading the Osborne SCJP study guide for Java 5. In the section on assertions, there is a line of sample code that reads:
    assert (x == 1) : new ValidAssert();What is ValidAssert? I can't find the javadoc for this class on the Sun site, and I don't get any helpful results when I Google this class name. Can anyone tell me what I've missed here?
    Thanks,
    Jim

    Sounds like the study guide defined it themselves and forgot to tell you about it!
    There are two forms of the assert statement:
    assert booleanExpression;
    assert booleanExpression : messageObject;I usually use the second version like this:
    assert x > 0 : "You dummy! x is supposed to be positive and here it is "  + x;But you could define a class whose toString method formats the assertion error message.
    That would be handy if you want to factor the message details out, if you
    want to use message bundles to localize the messages, etc...

  • Why can't I center contents in this div?

    I'm trying to center an image and an unordered list inside a div, but the contents are moving down past the boundaries of the div. I added a blue border to the div so you can see what it's doing. Can anyone diagnose this? I've monkeyed with it so much that I've probably done more harm than good.
    http://www.keithpurtell.com/kthings/bab/index03.htm

    I don't remember what your errors were.  Why don't you compare my code to yours?
    If you don't already have it, I urge you to download the Web Developer Toolbar for Firefox.
    https://addons.mozilla.org/en-US/firefox/addon/web-developer/
    Among many of its features is the ability to edit CSS code from the browser to see the effect it has on your page.   This is a must have tool kit for any web designer (novice to pro).
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Why can't I end my installation?

    when I wanted to install a game on my macbook pro, it stopped and now it has frosen. i can't take out the cd and i can't end the installation either. Help me??!

    Hold the command and tab keys to switch to the Finder and from the Apple menu select Force Quit on the problem installer. (If that doesn't work, then press and hold the power button down to force a hardware shutdown.)
    The disk should mount on the desktop where you can drag it to the Trash and Eject, or use the eject key on the keyboard.
    If it refuses to mount or eject, reboot the machine holding the option/alt keys down and a row of icons appear for Startup Manager, keep pressing the eject key there and it should eject. Click the arrow under OS X MacintoshHD to boot up.
    Next you need to check if the game is compatible with your OS X system, use the Apple menu > about this Mac (or open the System Profiler program in the Applications > Utilities folder) and find out your RAM, processor, video card (if any), graphics and OS X system version.
    Then compare this with the developers site and keep in mind that older games may not run on newer OS X versions.
    Also PowerPC based games will not run under later OSX versions of 10.7 or above.
    Also to run third party programs in 10.8 or higher, requires System Preferences > Security > run programs from Anywhere, or the control key held and clicked on the installer and "open" chosen to bypass Gatekeeper.
    Software for Windows PC's do not run on OS X, however it can if Windows is installed via BootCamp or virtual machines software
    If it's a 3D game, then check your Mac's ability to be even able to run it.
    Determine your Mac's ability for 3D games

  • MASK PRO - Why can't Adobe add masking like this ! - wow !

    This week, I saw a guy working on a project using a product by OnOneSoftware.com called "Mask Pro"
    He was extracting a woman from a very busy background. He effortlessly removed the woman, including strands of her hair in under a minute.
    I wonder why Adobe cannot implement something so powerful in Photoshop ?
    I am actually amazed at how well this program worked, I'm not sure if it is a plugin or stand-alone program, but it worked side-by-side with Photoshop.
    This Mask Pro works by quickly picking colors that you want eliminate and ones you wish to keep. Each time you click on a color you wish to keep, it loads them onto a little column and you see the colors appear. Then you choose ones you wish to eliminate. These appear on another column. Amazing how this works !
    You then take the special paintbrush tool, and just run over any area, such as the hair, and magically, it removed ALL background but leaves even the smallest strands of hair intact ! - It is truly wonderful to see.
    I'm sure Adobe knows about this product, so I wonder why they cannot make something similar, or just buy the company out and implement their product in Photoshop. You have to see this tool in use to actually believe it.
    Thanks,
    Dave.

    FWIW I don't even own any plug-ins and have used many selection tools and
    know how to make a decent selection
    I use color range, magic wand, magnetic lasso, refine edges and combos of
    those
    Also tried Russell Browns channel technique for flying hair etc (his example
    is on a plain gray cyc) and that hideous pen tool
    a complicated mask make might take me a couple hours and I feel my time is
    worth more
    the service bureau does it for $2.50 overnight
    the one I sent was FREE as a trial of their service
    and I was quite pleased with it
    for me the choice to farm out that un-creative task depends on the job,
    things like number of images to complete in the time frame given
    I prefer to use my time with an image for more the subjective changes, like
    color balance, light, filters, adding creative techniques, fixing what I
    want to
    it is like the choice to use a lab to print or do it all yourself
    benefits to both and choice dictated by the assignment
    after all once we didn't have to sit and process all our own images they
    went to an E6 lab
    and we paid them to do it
    so many things we did manually can now be done by a computer program such as
    replacing part of the background with parts from another frame
    adding softer depth of field by a plug in
    skin smoothing etc
    even windows live has stitching (even a little kid can do it as the
    commercial shows)
    resisitance is futile

  • Why does my apply laptop shut off Safari when I try  to watch videos online? Also why can't I use Firefox with this(I used to)

    Why does ma older apple laptop cancel Safari when I a m watching videos online?  Also,I used to be able to run Firefox but now message states "can't use with this operating system"?

    You can't use Firefox, because your operating system, OS X, is a version 10.4 or earlier. 
    Firefox "upgraded" its Mac compatible version, so that it will only operate with OS 10.6 or later.
    Your Safari also might quit, because it too has an upgraded version with greater stability geared toward 10.4 and later.  Perhaps you are using system 10.3 or earlier.
    It is also possible that Safari quits, because the video sites you watch have changed to be compatible with newer browser versions with later Flash Player compatibility, like Adobe.
    It is difficult to find browser compatibility or stability for earlier than 10.4.
    What the above post is showing is in the drop down menu in the upper left of your screen.  Click on the blue Apple for its drop down menu. Click on the first in the list, About This Mac. That's where you'll see the version as shown in the previous post.
    If you upgraded your Safari, even that could be a problem, because it might not work as well with your older operating system.  I haven't tried the following link, but it offers the Safari versions that fit each system. You can try downloading the one that matches yours.  If that doesn't work, you can always upgrade again.
    http://mac.oldapps.com/safari.php

  • HT201364 Why can Mavericks "not be installed on this computer" when I have all the system requirements?

    I have a 13" Macbook (Early 2009), 2gb memory, 9.29GB of free space and v10.6.8 already installed and yet when I click to download Mavericks, a popup comes up on the screen saying "Sorry, Mavericks cannot be installed to this computer". Why not??

    Something does not match up.  Check your year of manufacture.
    To install Mavericks, you need one of these Macs:
    iMac (Mid-2007 or later)
    MacBook (13-inch Aluminum, Late 2008), (13-inch, Early 2009 or later)
    MacBook Pro (13-inch, Mid-2009 or later),
    MacBook Pro (15-inch or 17-inch, Mid/Late 2007 or later)
    MacBook Air (Late 2008 or later)
    Mac mini (Early 2009 or later)
    Mac Pro (Early 2008 or later)
    Xserve (Early 2009)
    Your Mac also needs:
    OS X Mountain Lion, Lion, or Snow Leopard v10.6.8 already installed
    2 GB or more of memory
    8 GB or more of available space

  • Why can't I log out of this forum?

    Unless I delete cookies and then close tab the "user +"sign out" route fails.

    Does this also happen in a Private Browsing mode window?
    If clearing cookies didn't help then it is possible that the cookies.sqlite file that stores the cookies got corrupted.
    *Rename (or delete) <b>cookies.sqlite</b> (cookies.sqlite.old) and delete other present cookies files like <b>cookies.sqlite-journal</b> in the Firefox profile folder in case the file cookies.sqlite got corrupted.
    *http://kb.mozillazine.org/Cookies
    *https://support.mozilla.org/kb/Deleting+cookies
    You can remove all data stored in Firefox from a specific domain via "Forget About This Site" in the right-click context menu of an history entry ("History > Show All History" or "View > Sidebar > History") or via the about:permissions page.
    Using "Forget About This Site" will remove all data stored in Firefox from that domain like bookmarks, cookies, passwords, cache, history, and exceptions, so be cautious and if you have a password or other data from that domain that you do not want to lose then make sure to backup this data or make a note.
    You can't recover from this 'forget' unless you have a backup of the involved files.
    It doesn't have any lasting effect, so if you revisit such a 'forgotten' website then data from that website will be saved once again.

  • Why can;t i hear movies on this netbook seems to ask for a codec 8129?

    where  can i get this download?

    Go to the mixer, and click the "All" tab.
    It sounds like something, somewhere is solo'd.

  • Why Can't I Make Changes To This Image ?

    I have a black & white image, edited some time ago in a trial version of LightZone software,taken into PSE3, and saved as a flattened RGB .tif file. For some reason I can't apply any filters/effects/layer styles to this image. The filters/effects etc. seem to work until the image is flattened,then the image reverts to its original state. Changing to grayscale,then changing back to RGB has no effect,similarly with saving the image under a different name as a .psd file - I still can't get anything to stick at the 'flatten' image stage.
    I don't think it's a Lightzone problem as other images edited with this trial accept changes as per normal, and current images edit o.k.
    File size for me is normal at about 45MB.
    What simple obvious thing am I missing ?

    Rita....
    I tried this,but it didn't seem to make any difference.
    Barbara.....
    Yes I'm on 10.3.9
    BUT
    This morning I had a fresh look at the problem,as last night after midnight, having been up for 18 hours and playing with the problem for over an hour, it was probably not the best time to be submitting a question. I have now found that,contrary to my original post,the problem seems to be restricted to layers - adustment layers / layer styles.
    What I found this morning,with the original and a copy, was that if,for example, I applied a new gradient map adjustment layer to the image, I was actually achieving about 40% of the effect.
    I confirmed this by comparing the unflattened ORIGINAL image with the adustment layer applied, to the flattened adjusted COPY of the file. By reducing the opacity of the adjustment layer on the original to 40% I got a match between original and copy.
    I don't know whether this makes the problem any easier to explain,or if this problem simply falls into the odd unexplainable 'PSE quirk' category.

  • Why can't I do something like this?

    import java.io.*;
    import java.util.*;
    class a extends Thread {
        public void run() {
            String s = currentThread().getName();
            System.out.println(s);
    public class TestThreadName {
        public static void main (String args[]){
                    Thread[] p = new Thread[4];    // declare an array for threads
                   for (int i=0; i<4; i++){     
                    String pid = Integer.toString(i);   
                    a p[i] = new a();
                    p.setName(pid);
    p[i].start();

    I don't know why you invent a class 'a' and when
    creating a thread don't use it, since 'a' extends
    Thread. I don't know what you wanted to achieve with
    your example.
    But anyway, Thread cannot be extended. You normally
    use the interface runnable and write code into run()
    or you create a Thread as an inner class.This is incorrect. There is nothing wrong with extending Thread.

  • Why can I no longer print from this version of firefox

    with previous versions of firefox I have had no problem with printing direct from webpages and email but with this version Firefox 4.0.1 when I request to print page the browser freezes and the only way out is to close down the browser and start again. I can cut and paste into word and then print but I want to be able to print direct. How can I resolve this issue?

    Is this thing on?? 

  • Why can't I sign into Facebook this morning?

    This morning I am unable to sign into my Facebook account on any of my apple devices, Imac, Iphone, Ipad. I get a message that Facebook is down for maintainance. When I did a google search on this problem, the help sites that came up did not look like legitimate Facebook sites, so I decided to access Apple support

    Why does it still seem to be an option in the program if it doesn't work?
    That is a legitimate question but sadly enough one of the many mysteries that Adobe HQ likes to produce
    But for some countries uploading to FB was a possibility. However, in their infinitive wisdom the same HQ executives have decided to dump the whole export panel in Bridge CC (in combination with the Output Module and synchronized windows, due to protest you now have the difficult option to download and install the Output yourself but other options ave vanished).
    Dumping a problem seems easier then solving it, a strategy that is getting more common in large companies where the higher ranks and 'beancounters' seem to have lost every contact with their customers nor do they understand their needs.

  • Why can't I play videos from this website?

    My home page is www.cincinnati.com and on it they embed video clips. (I think embed is the right word.) When I click on them, a new page opens but with no video. I've tested Java, QuickTime, Flash and all are working according to their respective tests on their websites.

    If you use extensions (Tools > Add-ons > Extension) like <i>Adblock Plus</i> or <i>NoScript</i> or <i>Flash Block</i> that can block content then make sure that such extensions aren't blocking content.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

Maybe you are looking for