Where am i gone wrong in this applescript

tell application "Messages"
set myFolder to "/Users/palmglow/Documents/googledrive/orders/IFTTT/test"
set textMessage to ("-----")
set targetService to id of 1st service whose service type = iMessage
set myFolder to "/Users/palmglow/Documents/googledrive/orders/IFTTT/test"
tell application "Finder" to set latestFile to item 1 of (sort files of (POSIX file myFolder as alias) by creation date) as POSIX file
set theAttachment to POSIX file latestFile
repeat with theCurrentValue in theListOfValues
set targetBuddy to (theCurrentValue)
set theBuddy to buddy targetBuddy of service id targetService
send textMessage to theBuddy
send file theAttachment to theBuddy
end repeat
end tell

What is going wrong?  Any error messages?  What do you expect this script to do?

Similar Messages

  • Printer problem and where Apple have gone wrong....

    Using a Canon ip100 printer with Lion now gives an error message every time I want to print - says printer is not connected. Have to disconnect usb then reconect and it works.
    Also occasionally getting error message telling me I've just shut my computer down and it will restart - when I haven't!
    I'm not used to things not working properly on my Mac!
    I love progress, but am really disappointed with Apple with this release. It has lost it's clean simplicity, it's lost it's intuiative use, it's got bugs, amateurish graphics, childlike icons and feels generally dumbed down. - perhaps Macs are no longer for the discerning creative user, with Apple now prefering the profits associated with appealing to the masses. Despite decades of excellence under Steve Job's leadership is possible for even Apple to get it wrong - just like Microsoft did with Vista!  A pity - I don't feel I can enthuse about my Mac anymore.....

    With regards to the iP100, check that you are using v10.42.3.0 of the printer driver. This information can be found in System Information > Hardware > Printers.

  • What's wrong with this AppleScript?

    tell application "Pages"
      select tables of body text of front document
              set table properties to {width:20.5}
    end tell
    I want to select all tables in the Pages document and set the column width to 20.5 cm...
    But I'm getting an error... Can't set table ...
    Any help would be appreciated

    You can set the whole table width to 20.5 cm like this:
    tell application "Pages"
        set width of tables of body text of front document to "8.07 po" -- "20.5 cm" in Canada
    end tell
    Hope it can help.

  • Where have I gone wrong? (PS3 + 23" Cinema Display)

    Here I was thinking I was so clever buying an HDMI to female DVI adaptor so I could watch glorious blu-ray movies on my 23" Alu Display. However, after changing the video output on the PS3 to HDMI using my normal RCA TV and connecting the display up, all that happens is the little white light flashes three times, no picture.
    What have I done wrong, and is there any way to fix it?
    Regards,
    Michael

    Okay I did a quick search and came across a few things.
    Here is the solution you need..
    http://www.macworld.com/news/2007/03/12/hdmatescaler/index.php
    When I first read your post, I assumed you had a scaler and not just the plug adapter.

  • Duplicates in iphoto from syncs gone wrong ( will this idea work to fix it?

    Hello all, i have recently come back from a month of traveling the US in which i took about 2,000 photos on my iphone, so when i got back home i synced my iphone up to my imac, and during the sync process i launched iphoto and began importing the 2,000 photos. Well the first sync attempt froze, so i pulled the USB out of the phone and re-synced, and that froze, so i tried again this time successfuly importing the pics into iphoto, neatly organized by time-stamped events from 10/22/09-11/20/09. Anyway after the 3rd sync, i realized that the first 2 botched attempts actually imported some of the photos on each attempt but incorrectly time-stamping them to putting them into the July 09' event for some reason (first attempt), and creating a new event incorrectly time-stamped as the day of the import (2nd attempt). Anyway what this means is i have many duplicates and triplicates of most of those 2000 photos, its a mess.
    So having said that, i should note that i have never deleted any photos out of my iphone, i have every single photo i have ever taken still in my iphone camera roll, 3,700 to be axact. I have since taken the time to hand select all the photos taken from that trip in iphoto and correcty moving them into the correct time stamped event created from the 3rd succesful import. Rather than carefully guessing which photo is an original and duplicate and risking deleting photos by accident, i had an idea that i hope will work given the fact that i still have all photos still in iphone camera roll, and wanted to get feedback on this before i actually tried doing it,,,,
    ,,,i was thinking that if i went into iphoto and deleted all the photos and events from right before i left for the trip until now, and then re-synced my iphone to my computer, would iphoto recognize all those photos from that time needed to be re-imported from the camera roll into iphoto again, this time organizing them into their correct dated events? I have a setting for the importing of photos, something about not showing or syncing any photos that have already been imported from camera roll, so by deleting those pics from iphoto, i was thinking that it would detect those photos to not be in iphoto and want to re-import them. So i am taking this extra pre-cautionary step of asking the help forum if this would work or not before just going ahead and doing it. I do not have a digital camera so all my photos in iphoto are from my iphones cameral roll. Thanks for reading this.
    Stabb

    ok, so i tried my idea, i went into iphoto and selected all the events that were from the dates corresponding to those photos, and moved them into iphoto trash. Then i synced my phone back up to itunes, and after the sync was complete, i checked in iphoto to see if it would recognize those pics would need to be re-imported back in from my camera roll, and they weren't there in the import window. So either iphoto was not detecting those to be imported because all the photos were still in iphoto even though they were in the trash bin, or iphoto won't detect photos for importing after they've already been imported once despite them being deleted from iphoto after the import. I have an external hard drive with time machine backing my computer up every few hours and i am still a bit nervous to just empty iphoto trash with all those photos in it, so i just restored all the events back into iphoto from the trash bin. I really felt like this should have worked. Can anyone confirm if iphoto does not detect photos for importing off iphone camera more than once if they've since been deleted out of iphoto?

  • Help!! Where have I gone wrong with CSS ??

    Hi,
    I am having a few problems with our website (www.grateexpectations.com) as of yesterday evening. The website appears fine in safari (online and off line) but a mess in firefox and chrome and maybe explorer (online and off line) .
    I have never experienced this before, I have checked all styles and code. Could it be a virus? I have updated with Dreamweaver CC at work and CS5.5 at home. Is this the problem??
    Help!! Thanks.

    Start with the HTML errors show below.  Code errors are responsible for 98% of X-browser problems.  Some browsers are less tolerant of errors than others.
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.grateexpectations.com%2F
    Since  JavaScript throws errors in XHTML doc types, you can either wrap the JS code inside CDATA tags as shown below:
    <script type="text/javascript">
    <![CDATA[
    // JavaScript content goes here
    ]]></script>
    Or simply move scripts to an external JavaScript file.
    Nancy O.

  • Firefox has suddenly gone wrong. I was successfully running both Firefox and Internet Explorer 8 on Windows 7. I auto-accept upgrades including the most recent Firefox upgrade and the suggested upgrade to Adobe Flash 10.1. But after this, Firefox stopped

    Firefox has suddenly gone wrong. I was successfully running both Firefox and Internet Explorer 8 on Windows 7. My laptop is new and has plenty of RAM and HDD. I auto-accept upgrades including the most recent Firefox upgrade and the suggested upgrade to Adobe Flash 10.1. But after this, Firefox stopped working and does not work when I re-load Firefox 3.6. Also IE8 now works very slowly and does not locate major websites like Microsoft without a 'can't find the website message' and having to pressing Return a second time. When I do get to the Mozilla website and click on the button to try to download Firefox 3.6.6, I get this message "Oops! Internet Explorer could not find mozilla3.snt.utwente.nl". Can you help with what has gone wrong? As it stands, I can't use Firefox at all. Note: because Firefox did not work after the upgrade, I've downloaded the IE8 version of the Adobe Flash 10.1. What I really want is to be able to use both Firefox and IE8. But is this possible if they use different versions of Adobe Flash?
    == This happened ==
    Every time Firefox opened
    == About 2-3 days ago ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; .NET4.0C)

    I have been having the same problem as the original poster. After upgrading to Ffx 3.6.6, the program asks you to upgrade to Flash Player Plugin 10.1. I download and installed 10.1 only to find videos weren't loading.
    In my case, the problem is the previous installation of Flash Player (9.0.47) was somehow messing things up. To fix this, because I already had Flash plugin 10.1 installed I had to uninstall 10.1 using the uninstaller from adobe and then manually remove any files related the old flash player plugin 9.0.47
    Here is a run-down of my process:
    0. To check if you have a previous installation of the Flash Plugin lurking around, in Firefox go to Tools -> Add-ons -> Plugins (tab). At this point you may seen both Flash plugins.
    1. Proceed to uninstall Flash Plugin 10.1. Adobe provides an uninstaller here: http://kb2.adobe.com/cps/141/tn_14157.html
    ( you have to make sure you have nothing running when you execute the installer).
    2. On my Mac (sorry I don't know what it is in Windows) I searched the hard drive for any files/folders with "Shockwave". I found a folder called "Shockwave 10". It wasn't removed by Adobe's uninstaller. For safety I deleted it and then emptied the trash.
    3. I then went to My HD -> Library -> Internet Plugins.
    Remove the file and folder named "Flash player.old"
    4. Restarted; ran the Adobe Flash Player 10.1 installer. Restarted again.
    5. Opened up ffx and double checked the plugins list (see step 1). Version 10.1 is installed and available. Went to problem sites to test it out and Success!
    Hope this helps.

  • My iPhoto icon has a cross over it, when i open it, it You have "iPhoto" 9.2.1. you can't use this with this version of OSX? it used to work ?what's gone wrong?

    my iPhoto icon has a cross over it, when i open it, it You have “iPhoto” 9.2.1. you can't use this with this version of OSX? it used to work ?what's gone wrong?

    iPhoto 9.2.3 is incompatible with MacOS 10.9.3 Mavericks. If you are running Mavericks on your system you need to update iPhoto to 9.5.1. Only, the problem is, that this version is no longer available at the App Store.
    The easiest way to get a compatible iPhoto version in that case would be to upgrade to Yosemite, MacOS X 10.10, and then download the most recent iPhoto version from the AppStore, iiPhoto 9.6, like LarryHN suggested.
    If you cannot download iPhoto after upgrading to iPhoto 9.6 post back.

  • How to burn a video produced in iMovie in iDVD: with gratitude for the advice received I used the "professional quality" setting in iDVD for a video which in iMovie is 1h 20min long.  however this also failled. where did I go wrong, please?

    how to burn a video produced in iMovie in iDVD: with gratitude for the advice received I used the "professional quality" setting in iDVD for a video which in iMovie is 1h 20min long.  however this also failled. where did I go wrong, please?
    the message sked me to alter the quality of the DVD as the content was too large for the quality sellected.
    PLEASE HELP again,
    THANK YOU VERY MUCH
    MIchael

    Check the Advanced ➙ Project Information menu option to make sure the playing time of the entire project, movie plus menu is below the 120 minute limit.
    OT

  • After the recent iPhoto upgrade, I've completely lost access to the application and my photos and it says that its not supported on this version of Mac. Any idea whats gone wrong?

    After a recent upgrade, I've completely lost iPhotos and all my pholto files.
    It now comes up with 'You cant open the application iPhoto because it is not supported on this type of Mac'
    Any ideas whats gone wrong?

    Reinstall it:
    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2. Download it from the App Store to reinstall It's on your Purchases List* there.
    For older versions that have been installed from Disk you'll need these additional steps:
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    2c: on 10.7 or later they're at
    /private/var/db/receipts
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    *Sometimes iPhoto is not visible on the Purchases List. it may be hidden. See this article for details on how to unhide it.
    http://support.apple.com/kb/HT4928
    One question often asked: Will I lose my Photos if I reinstall?
    iPhoto the application and the iPhoto Library are two different parts of the iPhoto programme. So, reinstalling the app should not affect the Library. BUT you should always have a back up before doing this kind of work. Always.

  • HT5824 my iCloud account has the wrong mail address - where and how do I change this?

    my iCloud account has the wrong mail address - where and how do I change this?

    What do you mean with the wrong email address?
    - If it is not your account on your Mac, then just sign out and then sign in using your account in "System Preferences > iCloud".
    If you want to change your current email address which is associated with your iCloud account, please make sure that you turn of "Find My iPhone", "Find My Mac" on all your devices before you change your email address, then go to https://appleid.apple.com sign in and then change your Apple ID/iCloud ID. Please note that email addresses which end with @mac.com, @me.com and @icloud.com cannot be changed.

  • Something has gone wrong with my external hard drive after my macbook battery went off.. now i cannot paste or create new folder. Does anyone know how to fix this?

    something has gone wrong with my external hard drive after my macbook battery went off.. now i cannot paste or create new folder. Does anyone know how to fix this?

    Bus powered external drive?
    Backups?
    Does Disk Utility can see and repair the drive or not?
    Also try here in future:  MacBook Pro

  • I've just started using the App Tabs. I think this feature could be handy but why are the sites not updated when I start Firefox. Now I have to manually update the site which is somewhat of a downer. Does any of you know where I'm going wrong?

    I've just started using the App Tabs. I think this feature could be handy but why are the sites not updated when I start Firefox. Now I have to manually update the site which is somewhat of a downer. Does any of you know where I'm going wrong?

    To answer the post title FireFox save all downloads automatically in the download folder, which you can find in the Documents folder. If you want to choose where to save your downloads go to tools>options>check always ask me where to save files.
    Secondly, I am assuming you have IE 8 installed as this is the only version that supports this fix that is currently not in beta. Go to control panel>internet options>advanced tab and reset the settings at the bottom. This may or may not fix the problem but it is a good first step.

  • Lost 2500 photos last night. Mt wife cut and paste a photo into power point for editing. then saved it as a photo. Now in iphoto there is just this one photo and the other 2500 have gone. Where have they gone???????

    Lost 2500 photos last night. Mt wife cut and paste a photo into power point for editing. then saved it as a photo. Now in iphoto there is just this one photo and the other 2500 have gone. Where have they gone???????

    To answer some basic questions posted to aid people in helping me. These are
    I believe it is version 11 of iphoto as i tried to update but it says it has the latest update and Mac is 2 weeks old from new.
    OS is Lion.
    I have just tried to look everywhere on the Mac to see where the photos might be.
    There are no error messages showing on screen and it was fine before my wife did what she did. Even though we have back -ups of 95% of the pictures. I would like to know what happened so that it won't happen again.

  • ALV list with empty data - What could have gone wrong?

    Dear experts,
    I'm currently working on some codes to display data (the tables involved really do contain data), but when the codes are executed, the ALV list does not contain any data in it (only the column headers are fine).
    What could have gone wrong? I've been staring at the codes for hours now. Please help. Appreciate any help at all. 
    Displaying ALV data with REUSE_ALV_LIST_DISPLAY:
    form display_alv_data .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
    *     I_INTERFACE_CHECK              = ' '
    *     I_BYPASSING_BUFFER             =
    *     I_BUFFER_ACTIVE                = ' '
          I_CALLBACK_PROGRAM             = w_prog
    *     I_CALLBACK_PF_STATUS_SET       = ' '
    *     I_CALLBACK_USER_COMMAND        = ' '
    *     I_STRUCTURE_NAME               =
    *     IS_LAYOUT                      =
          IT_FIELDCAT                    = gt_field_cat[]
    *     IT_EXCLUDING                   =
    *     IT_SPECIAL_GROUPS              =
    *     IT_SORT                        =
    *     IT_FILTER                      =
    *     IS_SEL_HIDE                    =
    *     I_DEFAULT                      = 'X'
    *     I_SAVE                         = ' '
    *     IS_VARIANT                     =
    *     IT_EVENTS                      =
    *     IT_EVENT_EXIT                  =
    *     IS_PRINT                       =
    *     IS_REPREP_ID                   =
    *     I_SCREEN_START_COLUMN          = 0
    *     I_SCREEN_START_LINE            = 0
    *     I_SCREEN_END_COLUMN            = 0
    *     I_SCREEN_END_LINE              = 0
    *     IR_SALV_LIST_ADAPTER           =
    *     IT_EXCEPT_QINFO                =
    *     I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    *   IMPORTING
    *     E_EXIT_CAUSED_BY_CALLER        =
    *     ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = gt_final
        EXCEPTIONS
          PROGRAM_ERROR                  = 1
          OTHERS                         = 2.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.                    " display_alv_data
    Retrieving data from the database tables into the internal table:
    form retrieve_data .
      " For internal table 1
      SELECT ekbe~ebeln
             mseg~mblnr
             ekbe~belnr
             ekbe~ebelp
             ekbe~matnr
             ekbe~menge
             ekbe~dmbtr
             ekbe~werks
             mseg~lgort
             mseg~lifnr
             lfa1~name1
      FROM ekbe INNER JOIN mseg ON ekbe~ebeln = mseg~ebeln
                INNER JOIN lfa1 ON mseg~lifnr = lfa1~lifnr
      INTO CORRESPONDING FIELDS OF TABLE gt_1
      WHERE mseg~bwart = '101' AND      " Movement type: Goods Receipt
            ekbe~vgabe = '2' AND        " Transaction / event type for Invoice Verification Number
            ekbe~matnr IN s_m_num AND
            mseg~lifnr IN s_v_num.
      " For internal table 2
      SELECT ekbe~ebeln
             makt~maktx
             eket~eindt                 
      FROM ekbe INNER JOIN makt ON ekbe~matnr = makt~matnr
                INNER JOIN eket ON ekbe~ebeln = eket~ebeln
      INTO CORRESPONDING FIELDS OF TABLE gt_2
      WHERE eket~eindt IN s_d_date.
      " For internal table 3
      SELECT ekbe~ebeln
             ekko~bedat
             ekko~ekorg
             ekko~ekgrp
             ekko~bukrs
      FROM ekbe INNER JOIN ekko ON ekbe~ebeln = ekko~ebeln
      INTO CORRESPONDING FIELDS OF TABLE gt_3
      WHERE ekko~bedat IN s_p_date AND
            ekko~ekorg IN s_p_org AND
            ekko~ekgrp IN s_p_grp.
      " For the final internal table
      SORT: gt_1, gt_2, gt_3.
      LOOP AT gt_1.
        MOVE-CORRESPONDING gt_1 TO gt_final.
        READ TABLE gt_2 WITH KEY gfs_ebeln = gt_1-gfs_ebeln BINARY SEARCH.
        MOVE-CORRESPONDING gt_2 TO gt_final.
        READ TABLE gt_3 WITH KEY gfs_ebeln = gt_1-gfs_ebeln BINARY SEARCH.
        MOVE-CORRESPONDING gt_3 TO gt_final.
        APPEND gt_final.
      ENDLOOP.
    endform.                    " retrieve_data

    Dear forumers,
    I apologize for the rather late reply. The SAP server that I've been working on was down since Thursday evening and I wasn't able to debug much into the codes. Nevertheless, I really do appreciate all of your inputs and help here.
    Rob,
    I've just debugged my codes again and found out that in the first place, there is no data contained in the internal table gt_1 at all. My rough guess is because I've misused the INNER JOIN wrongly here (see code comments below):-
      SELECT ekbe~ebeln
             mseg~mblnr
             ekbe~belnr
             ekbe~ebelp
             ekbe~matnr
             ekbe~menge
             ekbe~dmbtr
             ekbe~werks
             mseg~lgort
             mseg~lifnr
             lfa1~name1  " this line should probably be commented out
      FROM ekbe INNER JOIN mseg ON mseg~ebeln = ekbe~ebeln
                        INNER JOIN lfa1 ON lfa1~lifnr = mseg~lifnr   " this line should probably be commented out - the table join here is not based on table ekbe at all
      INTO CORRESPONDING FIELDS OF TABLE gt_1
      WHERE mseg~bwart = '101' AND     
            ekbe~vgabe = '2' AND 
            ekbe~matnr IN s_m_num AND
            mseg~lifnr IN s_v_num.
    Next, I commented out certain lines further and found that there is still no data contained in the internal table gt_1 again, as follows:-
      SELECT ekbe~ebeln
             mseg~mblnr
             ekbe~belnr
             ekbe~ebelp
             ekbe~matnr
             ekbe~menge
             ekbe~dmbtr
             ekbe~werks
             mseg~lgort
             mseg~lifnr
             " lfa1~name1
      FROM ekbe INNER JOIN mseg ON mseg~ebeln = ekbe~ebeln
                        " INNER JOIN lfa1 ON lfa1~lifnr = mseg~lifnr
      INTO CORRESPONDING FIELDS OF TABLE gt_1.
      " WHERE mseg~bwart = '101' AND     
            " ekbe~vgabe = '2' AND 
            " ekbe~matnr IN s_m_num AND
            " mseg~lifnr IN s_v_num.
    There should be data contained in table ekbe here. What could have really gone wrong now?

Maybe you are looking for