Mail call iTunes script

I have a very simple Applescript saved and set to run via a Mail rule when it receives a certain type of message:
tell application "iTunes"
try
set alarm_playlist to user playlist "Alarms"
play alarm_playlist
end try
end tell
Whenever this is called, iTunes correctly starts playing, but the Application switcher fails to work from then on. It is shown correctly with the highlighted area moving as it should, but both keyboard (command + tab) and mouse control do not actually change the active application.
Witch, the dock and everything else as far as I can tell work perfectly. I will start the lengthy process of working through all my 3rd party stuff to see if that is the problem, but until this script is called the app switcher works perfectly. iTunes and Mail don't cause this to happen unless this script is called. I've checked this a dozen times now and it seems to be the cause.
Anyone got any ideas on this one or something you'd suggest I change in the above script?
Thanks
hfsdot

Hello
I'd try a shot in the dark. Something like this.
--SCRIPT
ignoring application responses
tell application "iTunes"
try
play user playlist "Alarms"
end try
end tell
end ignoring
--END OF SCRIPT
Seriously, it seems to me a bug of Application switcher and/or Mail.
Cheers,
H

Similar Messages

  • Mail command in script hangs and does not release control to calling script

    Hello folks,
    I am running in a situation which I haven't seen before.
    Main script calls function which executes another script.
    No matter which statement is the last in called script, it hangs on the last line and does not return control to main script.
    I tried to call another script not within the function - it is the same result.
    Can you help please.
    Below example of code:
    --- Main script:
    function checksum
    set -x
    /sybdump/ukgoald/scripts/egrep_expr1
    ##MAIN --- call to script script execution which runs mail command
    checksum
    ---- trace execution of called script:
    + read A B RF_FULL_NAME
    + print
    + /usr/bin/mailx -s Checksum Report [email protected]
    + 0< /sybdump/ukgoald/dump1/egrep_expr1.log3
    + print
    + return 0
    Edited by: ge**** on Dec 14, 2010 11:29 PM

    Hello folks,
    I am running in a situation which I haven't seen before.
    Main script calls function which executes another script.
    No matter which statement is the last in called script, it hangs on the last line and does not return control to main script.
    I tried to call another script not within the function - it is the same result.
    Can you help please.
    Below example of code:
    --- Main script:
    function checksum
    set -x
    /sybdump/ukgoald/scripts/egrep_expr1
    ##MAIN --- call to script script execution which runs mail command
    checksum
    ---- trace execution of called script:
    + read A B RF_FULL_NAME
    + print
    + /usr/bin/mailx -s Checksum Report [email protected]
    + 0< /sybdump/ukgoald/dump1/egrep_expr1.log3
    + print
    + return 0
    Edited by: ge**** on Dec 14, 2010 11:29 PM

  • Itunes scripts issue

    I have a power pc G5 iMac, and I want to use some scripts to simplify my iTunes.
    I have read previous posts, and keep coming across instruction to check for a "scipts" folder in user>library>itunes>scripts
    I have two itunes files in library......
    one called itunes and containing a second folder entitled iTunes plug-ins, it is empty. the second folder is called ituned music and seems to contain all the music files, I decided this must the right folder, didn't see a scripts folder, so i made one and placed a script inside it.
    It doesn't show on iTunes.
    I have restarted iTunes.
    I have rebooted whole computer.
    Is my music in an odd place or something?
    Please help,
    thanks,
    Bart

    I have two itunes files in library......
    one called itunes and containing a second folder entitled iTunes plug-ins, it is empty. the second folder is called ituned music and seems to contain all the music files, I decided this must the right folder, didn't see a scripts folder, so i made one and placed a script inside it.
    If your music indeed is located at ./Users/YourUsername/Library/iTunes/iTunes Music, it is in an odd place.
    The default location is ./Users/YourUsername/Music/iTunes/iTunes Music.
    But it does not matter, where it is located. As long as it plays fine there is no problem.
    Your iTunes scripts should be located in the path ./Users/YourUsername/Library/iTunes/Scripts, not in ./Users/YourUsername/Library/iTunes/iTunes Music/Scripts.
    If you have a recent version of iTunes, you can move your entire iTunes Music folder to the default location. Recent versions of iTunes can keep track of them.
    BTW: this does not work if you move the music to another disk. iTunes loses track of the files and you have to use another method.
    Hope this helps.
    M

  • Bash script - send mail only if script causes an error

    Hi,
    I have a script running on a server for backup purposes. I use
    /bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
    to send a report at the end of the script. But I would like it to send the report only if the script errors out.
    Any ideas,
    Thx

    That depends on how you capture errors and how you call the script you are running. If you don't "exit" on errors, at least set a variable like "error" and, at the end of your script use something like:
    if [[ error ]] ; then
        /bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
    fi

  • Exporting tracks to Sony W800i with iTunes script

    I have found a web site where someone has written an iTunes script to allow the synchronisation of iTunes playlists with a Sony W800i walkman phone. It all sounds very nice and fluffy but how on earth do i install/use an iTunes script? It's called iTuneMyWalkman.dmg
    Any tips?
    cheeers, dave

    You don't. A DMG file is for Mac computers. This script won't work on iTunes for Windows.

  • I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great

    I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great!

    The fact that you can receive means you have a valid e mail address, and have established the connection to the incoming server, so all of that works.  Since the send does not work, that means your outgoing server is rejecting whatever settings you used formthe outgoing set up.  Try them again. 
    Google your particular isp, and ipad and many times you will find the exact settings needed for your isp.  Or tell us here, and soneone else may be on the same isp.  Some mail services need you to change a port, or have a unique name for the outgoing server.  
    Kep trying.

  • HT2480 whenever i connect my iphone to pc while syncing mail in itunes a pop up" the connection is not available.outlook must be online or connected  to complete this action" please suggest me to solve this or bisable.

    whenever i connect my iphone to pc while syncing mail in itunes a pop up" the connection is not available.outlook must be online or connected  to complete this action" please suggest me to solve this or bisable.

    Cached exchange mode was already marked so that was not the issue.
    I have done all the usual of creating a new profile, reinstalling Outlook etc but nothing seemed to work. I also tried going back to Outlook 2007 and reinstalling Windows but same problem.
    However, I am not sure if it is connected but I was useing the option in MS Live Sync to synchronise Office settings which I turned off recently and now no longer have the issue. Unfortunately I cannot remember when in the process I did this so cannot be
    sure it was responsible - anyone else found this?

  • After updating to mavericks I have to constantly enter my apple ID for mail, iBooks, iTunes and many other applications that used to be part of my keychain. How can I get my log-in to work again?

    After updating to mavericks I have to constantly enter my apple ID for mail, iBooks, iTunes and many other applications that used to be part of my keychain. How can I get my apple ID log-in to work again?

    Several times I've re-entered my passwords under Preferences/Internet Accounts/iCloud and it won't save since I've installed Mavericks.  Also, the iCloud icon in the left column in Preferences/Internet Accounts/iCloud is greyed out but allows me to click on it to set-up.  When I click on iCloud the password is filled out but the "Enable this account" check-box is not checked.  I check it, and all seems correct.  The icon is no longer grey, the password is correct, the "activate this account" check-box is checked.  Then, when I launch mail, notes etc. I'm still prompted to re-enter my apple ID.  The log-in loop continues.  For years my keychain has worked perfectly.  What has changed in Mavericks?

  • Column link - call java script & assign current report column value to item

    Hi,
    How to call java script and assing current report column value to item?
    I have a button column in the report to 'delete' the selected row.
    I want to first show dialog box with message 'Are you sure?'. If yes, process to delete
    will be executed, else no action.
    In order to fire JS, I used Column Link ->Target=URL.
    Problem: The alert is showing but I don't know how to pass selected row's primary
    key value to process (to delete selected row).
    I have a item which can be used to store selected primary key value but don't know how to assign the value
    when button pressed.
    Thanks in advance
    Dip

    Ok. The issue has been resolved by following way.
    PAGE PROCESS: delete_request
    begin
    delete xyz
    where id = :P8_id;
    commit;
    end;BUTTON URL:
    javascript: DelRec(null,'CREATE', 'f?p=&APP_ID.:8:&SESSION.:delete_request:NO::P8_id:#id#');Java Script:
    <script language="JavaScript1.1" type="text/javascript">
    function DelRec(msg, req, url){
    var confDel = msg;
    if(confDel ==null){
    confDel= confirm("Are you sure?");
    }else{
    confDel= confirm(msg);}
    if (confDel== true){
    redirect(url);           }
    </script>

  • Mail.app redirect script doesn't work

    I'm trying to script a batch process to redirect selected messages in the Mail application. I found a nifty script on macosxhints.com--only one problem: it doesn't work with 10.4's Mail.
    The script fails ("variable is undefined") when trying to get the result of:
    redirect message with opening window
    According the the Mail dictionary, redirect should return an "outgoing message". Instead it appears to be undefined, and I can't figure out how to manipulate the newly created message to change the recipient, sender, etc.
    Any ideas?
    G5   Mac OS X (10.4.5)  

    has anyone gotten this script to work with 10.4.6?
      Mac OS X (10.4.6)  

  • Calling SAP script program in BAPI and want to display in html format

    Dear All,
    I am writing bapi and calling sap script program in it.
    I want output in html format pl suggest me
    same coding is working for report giving error in sapscript only.
    types: begin of tt_html,
                 html type w3html,
           end of tt_html.
    data: list_tab type standard table of abaplist.
    SELTAB-SELNAME = 'S_INVNO'.
    SELTAB-KIND = 'S'.
    SELTAB-SIGN = 'I'.
    SELTAB-OPTION = 'EQ'.
    SELTAB-LOW =  INVOICE_NUM1.
    SELTAB-HIGH = INVOICE_NUM2.
    APPEND SELTAB.
    submit ZSDRDINVPNBRPT with selection-table seltab
    exporting list to memory and return.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = MTAB_REPORT_LIST
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
        CALL FUNCTION 'WRITE_LIST'
         EXPORTING
           WRITE_ONLY       = 'X'
          TABLES
            listobject       = MTAB_REPORT_LIST
         EXCEPTIONS
           EMPTY_LIST       = 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.
    CALL FUNCTION 'WWW_LIST_TO_HTML'
           TABLES
                HTML   = MTAB_REPORT_HTML
           EXCEPTIONS
                OTHERS = 1.
    LOOP AT MTAB_REPORT_HTML.
    ENDLOOP.

    For displaying output in html format,
    u can either use BSP ( Business Server Pages)
    or Webdynpro.
    Reward if helpful.

  • What do you do when you download an app and the app doesnt work right, then you call itunes and they cant do anything about it cause it's in a different language and you come to a dead end

    I downloaded the ispytoys app for the tank, the tank works but not all the features and the tank will only travel 2 feet at a time then you have to move the button forward again, I call itunes but there's nothing they can do cause its in japanese or chinese, anyway, nor itunes or I can read it, so I'm at a dead end. What are my options, this ***** cause one of the features is you can email the videos and pictures out that you take with the tank but mine wont let me. I taled to the people I bought it from but there is nothing they can do cause its in the app and itunes cant do anything about it either, so , do I live with it? Sincerely one bummed out person. If anybody can help me, I would seriosly appreciate it.

    Carolyn Samit wrote:
    Hi...
    Apple's policy states, "all sales are final" > iTUNES STORE - MAC APP STORE - TERMS AND CONDITIONS
    Wow .... that is one long document . Not as long a read as: Apple - Legal

  • Need to call Shell script that uses SQL loader in APex4.1/11g

    Hi there!
    I have a requirement, wherein I have to call a shell script that connects to an external server, ftp's a file in and then uses sqlloader to load data into our table. Now we have the ftp script that does this for another program, but is a scheduled job. I wanted to call the ftp shell script from within APEX. Any suggestions on how this can be done, what PL/SQL logic can we use? I see online some people using dbms scheduler for this?
    Thank you
    Sun

    Hi,
    Create some sh script on your oracle host machine where you can join into external server and run the process.
    something like:
    run_external_sh.sh
    #!/bin/sh
    ssh ext_user@ext_host ./sqlloader/import/import.shThen create a external JOB to call it via ORACLE(PL/SQL)
    -- Call Shell Script.
    BEGIN
      DBMS_SCHEDULER.create_program (
        program_name        => 'external_call_sh',
        program_type        => 'EXECUTABLE',
        program_action      => '/local_host/call_external/sh/run_external_sh.sh',
        number_of_arguments => 0,
        enabled             => TRUE,
        comments            => 'Call external SH script');
    END;
    /Now you can create a scheduled/or not scheduled JOB
    -- Job defined by an existing program and schedule.
    BEGIN
      DBMS_SCHEDULER.create_job (
        job_name      => 'jb_external_call_sh',
        program_name  => 'external_call_sh',
        schedule_name => 'external_call_scheduler', -- created scheduler
        enabled       => TRUE,
        comments      => 'Job defined by an existing external_call_sh program and schedule.');
    END;
    /Now you can call the JOB in APEX in PL/SQL process.
    BEGIN
      -- Run job synchronously.
      DBMS_SCHEDULER.run_job (job_name            => 'jb_external_call_sh');
    END;Regards
    J :D

  • Calling RMAN script with DBMS_JOB

    Hi,
    Maybe someone can help me out. I'm perfecting my skills on 9i in the backup area before I have a need to use them and am taking notes.
    What I want to do is to store the backup script in the recovery catalog (which I already did under the name BACKUP) and call that script on a daily basis using DBMS_JOBS.
    Here is my script:
    RMAN>CREATE SCRIPT 'BACKUP'
    {ALLOCATE CHANNEL C1 TYPE DISK;
    BACKUP INCREMENTAL LEVEL 0 DATABASE
    FILESPERSET 4;
    BACKUP ARCHIVELOG ALL;
    DELETE ARCHIVELOG UNTILTIME 'SYSDATE-7';}
    This script compiled and is stored in rman. I ran it and it worked. I also autoconfigured the parameters to backup the controlfile automatically when the backup or copy is done.
    Now my next goal is to get this script to run automatically everyday using DBMS_JOBS and this is where it is not working.
    I used the DBMS_JOB.SUBMIT parameters to store the job in this feature but first the procedure 'RUNBACKUP' must compile successfully.
    DBMS_JOB.SUBMIT(:1,'RUNBACKUP', SYSDATE,'SYSDATE+1');
    This RUNBACKUP is a procedure that has to be called by the DBMS_JOBS PACKAGE. But the procedure is where Im having problems trying to write.
    I am assuming that rman is not connected to the target database here. So this is what I think it should look like:
    CREATE OR REPLACE PROCEDURE RUNBACKUP
    BEGIN
    RMAN; --the first thing that           
    has to be called is rman executable.
    CONNECT TARGET AL/AL@BBROWN
    --now we have to connect the target db to rman.
    CONNECT CATALOG RMAN/RMAN@RCAT;
    -- connecting to the recovery catalog.
    RUN {EXECUTE SCRIPT 'BACKUP';} --execute the stored backup script
    END;
    Also, at the end of this procedure I would like to exit rman as the final command.
    Any ideas on this would be appreciated and thanks for your help in advance.
    Al

    You need to create a shell script to execute rman and add that script to cron, something like this:
    #!/bin/ksh
    # Script name: whole_db_backup.ksh
    export PATH=/oracle/app/9i/bin:$PATH
    export ORACLE_HOME=/oracle/app/9i
    export ORACLE_SID=MDR
    rman <<EOF
    connect target /
    connect catalog rmancat/PASS@RMANCAT
    run {execute script whole_db_backup;}
    exit
    EOF

  • Use subflow or redirect step when calling another script

    I have a main AA script and it calls another script when caller press option 6.  When a caller presss 6 it is only transferring the call to the sub script.  it does not return any values to the main script.
    In this situation, is it better to use subflow or redirect step.  i am think redirect step but just want to check with the user community.
    thanks in advance.

    Either will work. Here are a few thoughts to consider in no particular order:
    Subflows count toward the originally triggered scripts' maximum step count. If you have a lot of steps, this may result in an exception. Redirecting the call restarts this counter since the newly triggered script will have its own counter.
    NOTE: You might think that this is exactly why the Trigger Application step in Synchronous mode was created for. Alas, there is a bug which renders this useless in 7.0(1): CSCtd72562
    Redirecting the call will result in the user hearing ringback. This would occur because of the recommended two-second delay step following the Accept step of a step to prevent a race condition. I find this to be irritating enough to shy away from it mid-way through an IVR if possible.
    Subflows are more difficult to debug. You need to have sufficient code embedded in them such that you can trigger and reactively debug them.
    Be sure that the redirect destination of an actual CCX Trigger (CTI Route Point). Do not set it to a value in UCM that is translated or forwarded back to CCX. This results in a race condition which CCX does not handle well.
    If you were asking me as an individual my answer would be this: Is the code small enough and not reused elsewhere? If yes, then put it in the first script and avoid this topic all together. If it's reused in a bunch of places from multiple scripts and does not represent a large quantity of steps: use a subflow. Otherwise use Trigger Application if you're on a new enough version or Call Redirect if you're not.

Maybe you are looking for

  • Doubt in Update query

    I have a problem using update query, for updating one column in a table with another column in another table. For eg say i have two tables, collector and survey Fields in Collector: col_n_account_num col_v_email col_n_phone_number Fields in survey su

  • How to load info type 7410 career types to Jobs or Positions

    Hello Expert, I'm trying to use T-code PP01 to load career types and career levels (info  type 7410 )  by LSMW, But I'm not able to maintain info type 7410 by pp01, I had change the  table T77CD to accept maintain infotype from standard transaction,

  • [Cisco ACS 5.2] Windows XP - EAP-TLS error

    Hi, We used RADIATOR with Cisco WLC and Cisco AP in our WiFi architecture. We just replaced RADIATOR with Cisco ACS 5.2 . Few computers with Windows XP SP3 have this error : 11514 Unexpectedly received empty TLS message; treating as a rejection by th

  • Error in Approval process

    Hi All, I am a new bie to OIM 11g. I have developed a custom (single level parallel) approval composite and it is working fine. According to my new requirement I need to add two serial approval blocks before the parallel approval block. On the whole

  • InDesign CS2 on Windows 7 issues

    I am trying to export to a pdf file and it is giving me an error message saying it has failed to export.  I have been using CS2 on Windows 7 for over a year and this is the first time it has not allowed me to export.  Any suggestions?