Launchd to run Applescript app. only when an iWorks program is running

How can I make launchd load an applescript application (that autosaves documents) only when an iWorks program (Pages, Numbers) is running?
I am using Launchd Editor or Lingon to right the plist file.

There isn't a launchd trigger I'm aware of that will do this.
The best you can do with launchd is a StartInterval which launches your application every n seconds and have the script perform the check to see if one of the target applications is running.

Similar Messages

  • Launchd: How to Run a Job Only When Waking?

    I want to run a script when the computer wakes from sleep. I've read everything I can find about launchd and cannot find a solution.
    I tried RunAtLoad, but it did not run the script when the computer woke from sleep.
    Is there a parameter for launchd that will run a job only when the computer wakes from sleep?
    I know other parameters like StartInterval will run any "queued" jobs when the computer wakes up, but I'm looking for a parameter that runs the job only when the computer wakes up.
    Any help is appreciated.
    Thanks
    Brett

    Sorry, but there is no capacity for that built into launchd.  You might be able to hack something together (I've tried before, with some limited success), but it will be easier and more stable to use sleepwatcher. 

  • Getting the variant name when the report program is run in background

    Hi All,
    How to get the variant name for the report program when run in background? My requirement is to create an email attachement with the name 'variant.XLS', where variant = selection screen variant, when the report program is run in background. The system field SY-SLSET holds the variant name only when run online.
    Any pointers to this will be highly appreciated.
    Thanks and regards,
    Nilesh.

    Hello Nilesh,
    Please find the algo:
    1. Call the FM: GET_JOB_RUNTIME_INFO to get the background job details.
    2. Select data from TBTCP using these details:
    DATA:
    FP_EVENTID   TYPE BTCEVENTID
    FP_EVTPARM   TYPE BTCEVTPARM
    FP_ACTIVE    TYPE BTCXPGFLAG
    FP_JOBCNT    TYPE BTCJOBCNT
    FP_JOBNM     TYPE BTCJOB
    FP_STEPCNT   TYPE BTCSTEPCNT.
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
        IMPORTING
          EVENTID                 = FP_EVENTID
          EVENTPARM               = FP_EVTPARM
          EXTERNAL_PROGRAM_ACTIVE = FP_ACTIVE
          JOBCOUNT                = FP_JOBCNT
          JOBNAME                 = FP_JOBNM
          STEPCOUNT               = FP_STEPCNT
        EXCEPTIONS
          NO_RUNTIME_INFO         = 1
          OTHERS                  = 2.
      IF SY-SUBRC <> 0.
    *   Error calling FM: GET_JOB_RUNTIME_INFO
      ENDIF.
    DATA: FP_VARIANT TYPE BTCVARIANT.
      SELECT JOBNAME JOBCOUNT STEPCOUNT VARIANT
      FROM   TBTCP
      INTO TABLE L_IT_TBTCP
      WHERE  JOBNAME   = FP_JOBNM
      AND    JOBCOUNT  = FP_JOBCNT
      AND    STEPCOUNT = FP_STEPCNT.
      IF SY-SUBRC = 0.
        SORT L_IT_TBTCP BY JOBNM JOBCNT STEPCNT.
        READ TABLE L_IT_TBTCP INTO L_WA_TBTCP INDEX 1.
        IF SY-SUBRC = 0.
          FP_VARIANT = L_WA_TBTCP-VARIANT.
        ENDIF.
      ENDIF.
    Hope this helps.
    BR,
    Suhas

  • ICal failing to run applescripts: The 'Open' button does not change to 'Run', and the script file is opened but not executed on alert.

    iCal failing to run applescripts: The 'Open' button does not change to 'Run', and the script file is opened but not executed.

    Calendar (not called iCal anymore) does not include that capability any longer, apparently.  What you have to do now is go to Automator and create a Calendar Alert action.  You can add a Run AppleScript object to the action and paste in your script there, then when you save it, it will become available as a choice in the alert menu in Calendar.

  • Is it possible to run an app automatically when the idevice is plugged in?

    I am looking to develop a simple app which i would like to automatically run when plugged in to a power source.  Im just wondering if this is possible?

    If you mean launch if not launched already...no. The user needs to take such action.

  • Pavilion zd7000 starts in battery mode only; runs on AC only when connected to printer by USB port

    My Pavilion zd 7379ea will only start up in battery mode. AC adapter appears OK with a firm green LED, so external power supply may not be the issue here? When I'm starting up (with what's left on the battery), both the charging LED and the AC LED are constantly blinking. When turned off, the battery LED is firm, and battery appears to be charging (but which obviously is not the case).  Occasionally, when computer is turned off, the AC LED is lit with a firm light.
    One odd thing I noted before this happened was that the computer ran on AC only when my HP printer was connected to one of the USB ports (no battery inserted). If I disconnected the printer USB cord, the computer just died immediately; it was like the computer was powered by the printer. Later I also discovered that the same cord (where it connected to the printer) had melted from extreme overheating. I tried to update the USB drivers for each port but it didn't change things. I also tried to connect a different printer to get the computer started but it didn't work this time. I'd be extremely grateful for any comments that may solve this power supply issue (and if possible explain the stuff with the printer connection).
    S/N{removed for privacy]; P/N PH989EA#AK8

    Hi,
    Schindi285460 wrote:
    My Pavilion zd 7379ea will only start up in battery mode. AC adapter appears OK with a firm green LED, so external power supply may not be the issue here? When I'm starting up (with what's left on the battery), both the charging LED and the AC LED are constantly blinking. When turned off, the battery LED is firm, and battery appears to be charging (but which obviously is not the case).  Occasionally, when computer is turned off, the AC LED is lit with a firm light.
    One odd thing I noted before this happened was that the computer ran on AC only when my HP printer was connected to one of the USB ports (no battery inserted). If I disconnected the printer USB cord, the computer just died immediately; it was like the computer was powered by the printer. Later I also discovered that the same cord (where it connected to the printer) had melted from extreme overheating. I tried to update the USB drivers for each port but it didn't change things. I also tried to connect a different printer to get the computer started but it didn't work this time. I'd be extremely grateful for any comments that may solve this power supply issue (and if possible explain the stuff with the printer connection).
    S/N{removed for privacy]; P/N PH989EA#AK8
    You unplugged a USB device while the notebook was still booted into Windows and on? 
    Normally that won't cause any issues but , If you did that you may have damaged your  system board's Southport chip.
    USB is not a plug n' play port like SATA  and eSATA are.
    Here is a link to the maintenence manual for your laptop series.
    Is your notebook still within warranty? By the processor components listed in the manual,I believe it is probably not.
    best regards,
    erico
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • CPU is idle when one of program is running

    Hi -
    I am running a program under terminal. The Activity Monitor shows the program is using 100% of CPU, however the left bottom corner in the Activity Monitor shows that 86% of CPU is idle.
    Can I allocate more CPU for one specific program?
    How to increase the computering power for one specifc program?
    Thanks,
    Michael

    The Activity Monitor shows the program is using 100% of CPU, however the left bottom corner in the Activity Monitor shows that 86% of CPU is idle.
    Can I allocate more CPU for one specific program?
    How to increase the computering power for one specifc program?
    I'm guessing, but from the 'top' display, I think you have 8 CPU hyperthreads (maybe this is an intel quad core i7 processor with hyperthreading support, so it looks like you have 8 CPUs).
    The ibis process is saturating 1 CPU hyperthread.  The hypertheaded CPU cannot go any faster, it is giving ibis all its got.
    To go faster here are some of your options (you will most likely not like any of them )
    a)  get another Mac with a faster CPU (more Gigahertz)
    b)  hack your Mac with a hyper cooling kit and mess with the clock frequencies to make your CPU run faster.
    c)  find a more efficient program that does the same thing ibis is doing for you (maybe one that is already written to be multi-threaded).  Just because a program is running at 100% does not mean it is using the most efficient algorithms, and a program with more efficient algorithms will get to its goal faster even though both programs may be using 100% CPU, or actually a more efficient algorithm may actually use less CPU and still get to its goal faster.
    d)  rewrite ibis so it is multi-threaded, thus using more than 1 CPU.  Writing multi-threaded code is not easy, or all the kids would be doing it.  And it tends to only be effective when the data being worked on can be broken down into multiple independent parallel tasks, otherwise the threads end up all just waiting for the slowest task to complete and most of the CPUs sit at idle waiting.
    e) rewrite ibis so it uses more efficient algorithms.
    f)  other ...

  • Required frameworks for running AppleScript apps

    Does anyone know what the required frameworks/files are for AppleScript/AppleScript Studio based apps to run properly? Thing is, I have a minimalist install here based on Mac OS X Leopard 10.5.3, however my AppleScript based applications will not run because of the lack of something. If I could find this out that would be great

    psydrake wrote:
    > I am an administrator of a WebSphere 6 Network
    Deployment installation, and I
    > have a customer who would like to run her Coldfusion
    application in WebSphere.
    >
    http://livedocs.macromedia.com/coldfusion/6.1/ibmdocs/install_.htm
    > instructs to do the following:
    > 1. Install the ColdFusion files.
    > 2. Deploy the ColdFusion J2EE application.
    > 3. Configure ColdFusion in the Configuration and
    Migration Wizard.
    > 4. Enable specific functionality required by ColdFusion
    applications, such
    > as the Verity search engine.
    >
    > Is this a separate application server that must be
    installed and run on the
    > WebSphere machine, or is everything (e.g. the Coldfusion
    libraries) that is
    > needed included in the resulting J2EE .ear file that the
    developer hands to me?
    All the standard Java bits are included in the EAR file.
    However,
    ColdFusion comes with additional functionality such as Verity
    Indexing
    and a JDBC-ODBC bridge that run as separate services (and may
    be
    Windows-only). If your developer uses those, they need to be
    installed
    as well and that is not part of a standard EAR file
    deployment. Your
    developer should be able to tell you more about those.
    > Would I as a WebSphere administrator be performing all
    of this installation and
    > configuration, or are these all steps that the developer
    performs in the
    > process of packaging her J2EE .ear file?
    When we deliver an EAR file we perform most of these tasks
    when
    packaging the EAR file so all that is left for the WebSphere
    admin is
    step 2 "Deploy the ColdFusion J2EE application.". You need to
    consult
    your developer to see how much he does and how much you need
    to do for him.
    Jochem
    Jochem van Dieten
    Adobe Community Expert for ColdFusion

  • Running Applescript apps...

    Hello.
    I have an Applescript that copies a png from a server and sets it as the current clients desktop picture. When I run it on my test systems it runs fine, when I copy and run it over ARD however, the client asks permission to open the app and then tries to install it instead of running it. Any ideas?

    Thanks, but sadly I still get the install error. I think I'll just do everything with Unix instead of using Applescript, it's simpler.

  • Mail.app - Rule runs AppleScript, App crashes

    I have a very simple AppleScript that extracts some information from the content of a message and is eventually supposed to do something with it. However, I have hit a snag:
    I can get the data from the content and I can tell Mail to 'display dialog' with that data. That works fine the first time I run the script, but if I put in a loop to go thru multiple messages or if I simply run the script again on the same message I get a blank dialog box, a bit of whirring and Mail crashes.
    Any ideas? I suspect this is some corruption somewhere, but I am really not too sure where to start...

    I decided on the good old 'repair permissions' route after other apps started to behave strangely - crashes all over the place. Not only did that fix the stability, but Mail has started to behave as expected now.

  • Intel xServe fans run at max only when connected to Netgear JGS524 switch

    The fans will slowly ramp up to 11k - 16k rpm when either one (or both) of the network connections are plugged into the NETGEAR JGS524 switch. When unplugged, the fans will reduce to a normal 6k - 7k rpm. This wasn't an issue before the server was upgraded to Leopard server from Tiger server.
    Swapped out the Ethernet cables, swapped out the switch with a brand new one, removed all other connections from switch--no dice. The server can be connected directly to a NETGEAR FVS318 router with no problem and the fans will run normally.
    Does anyone know of any firmware issues or software issues--or any other issues--that affect Leopard server and NETGEAR JGS524?

    Swapping the Netgear switch out for a different brand would be something to try. I can't do that right now, but it's on the list.
    The temporary solution is to leave the connections set to 100BaseTX to keep the fans in check.
    I tried to update the firmware, but it won't update to either version I have.
    The machine is an xServe (Late 2006). It's firmware is at XS11.0080.B03 --which I can find no information about whatsoever.
    The updater packages for EFI 1.0 and 1.1 complain: 'Alert This computer does not need this update.' Also, the 'xServe EFI Firmware Update.app' is not in the /Applications/Utilities/ folder as the firmware installation instructions on Apple's site mention. Is this an issue? Or do the EFI firmware packages contain the necessary installer?
    The latest firmware for any Intel xServe is XS11.0080.B06 (EFI 1.1)--for Early 2008 models. The only previous update I can find is XS11.0080.B01 (EFI 1.0)--for Late 2006. But that's actually lower than what I have.
    This site show the only info I can find about xServe EFI firmware: http://support.apple.com/kb/HT1237
    Has anyone ever heard of the XS11.0080.B03 firmware? Or know how I can force my machine to update or revert the firmware?

  • I'm unable to run AppleScript.app after upgrading to Mavericks, is this as it should be, and is there a replacement for AppleScript?

    When I navigate to the Applications/Utiilities folder, and attempt to open the AppleScript editor I get an error popup with:
         The document "AppleScript Editor.app" could not be opened.
    Has AppleScript gone away, or is my OS Installation broken?
    Thanks,
    CraigP
    Ok, so it's broken.  Any idea how to un-break it?  For example, is there Installation Media for Mavericks that I can burn and attempt a re-install with?

    Your installation is broken.

  • Running VM Manager only when needed, is this possible?

    I don't have much resources to hand and currently have the VM Manager installed on a VMWare Server Enterprise Linux image which is actually running my WebLogic Portal. I would rather install the VM Manager on the VM Server, but I can't afford to loose the RAM from the guest OS.
    Is it possible to just have the VM Manager installed on a separate environment but only bring it up when I need it? If so, is there a script I can call on the VM Manager install to shutdown/startup the required XE database and OC4J instances which constitute the VM Manager installation?

    Simon Thorpe wrote:
    Is it possible to just have the VM Manager installed on a separate environment but only bring it up when I need it? If so, is there a script I can call on the VM Manager install to shutdown/startup the required XE database and OC4J instances which constitute the VM Manager installation?Sure. The VM Manager is not required for general running purposes or HA (which is handled by the Server Pool Master). To start Oracle VM Manager:
    service oracle-xe start
    service oc4j startBoth oracle-xe and oc4j have standard init.d scripts. :)

  • Is it possible to allow to run one app only?

    Hi, I'm going to use iPad as a touchscreen for Avit automation system ( http://www.comm-tec.de/englisch/CommandFusion.html?sid=TT6cVtRXhCUAACjoJ6s ). I will have iPad in the cradle, and I would need to run only the iViewer app, disable all other apps, and to run it automatically after the device is turned on. Is this possible? Thanks

    Sorry, but no, it would not be possible to develop an app that could prevent someone from being able to just press the Home button to quit your app and/or to block other apps from running. The developer kit doesn't allow that level of access to the OS.
    Perhaps an Android-based tablet would allow this sort of functionality. I have no experience with the Android developer kit, but from what I've read it's a lot more open to low-level access and modifications (which consequently is making the Android devices more prone to malware). I doubt it would be something that would be easy to do, but it might be possible.
    Regards.

  • WSUS crashes only when the "WSUS Service" is running

    Hello,
    I am fixing a WSUS server that was neglected for about a year. There was 30000+ approved updates when I got there and every query would timout.
    After messing around with it a little I was able to have WSUS query all of the updates. I removed the superseded updates, unneeded language updates, and drivers. I was able to to get the Approved updates down to ~150.
    Most of the computers worked fine and receieved all of their updates. 1 computer kept getting error 8024401F. I read that to fix this I could try "wsusutil reset" after I did that I started getting Timeout errors again. After playing with it some
    more, I found that if I stop the "WSUS Service" WSUS will query fine without any issues. As soon as I start the service again I get this error:
    The WSUS administration console has encountered an unexpected error. This may be a transient error; try restarting the administration console. If this error persists, <o:p></o:p>
    Try removing the persisted preferences for the console by deleting the wsus file under %appdata%\Microsoft\MMC\.
    System.ComponentModel.Win32Exception -- The service did not respond to the start or control request in a timely fashion<o:p></o:p>
    Source
    System.Windows.Forms<o:p></o:p>
    Stack Trace:
       at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
       at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
       at Microsoft.UpdateServices.UI.SnapIn.Wizards.ServerCleanup.ServerCleanupWizard.OnCleanupComplete(Object sender, PerformCleanupCompletedEventArgs e)
    Any idea what it might be?

    Most of the computers worked fine and receieved all of their updates. 1 computer kept getting error 8024401F. I read that to fix this I could try "wsusutil reset"
    I'm not sure where you read this, but it makes no logical sense at all to me. If only ONE computer is throwing an error, and many others (if not all) are working fine, the problem is almost certainly at THAT CLIENT, not on the SERVER!
    As for your subsequent WSUS problems after launching the reset, it may take several days for the WSUSUTIL RESET to complete its reconciliation, so your behaviors after launching the reset are actually not unexpected. Especially since we know your server
    has at least 30,000 updates synchronized.
    As for the 0x8024401F error code:
    0x8024401f
    -2145107937
    WU_E_PT_HTTP_STATUS_SERVER_ERROR
    Http
    status 500 - internal server error
    any of several things could be causing an HTTP 500 error, but we really need to know IN CONTEXT where the error code is generated in order to identify an appropriate approach to resolution. One thing I'm pretty certain of... a WSUSUTIL RESET isn't the fix.
    I see that you did ultimately resolve the issue by deleting the updates from the database using the PowerShell script. It's quite possible that the large number of updates was contributing to a single client's HTTP 500 error, depending on what the state
    of that client actually was at the time the error was encountered.
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

Maybe you are looking for

  • Checkbox field in ALV for REUSE_ALV_GRID_DISPLAY

    how to handle Checkbox field in ALV for REUSE_ALV_GRID_DISPLAY???? For example Alv has displayed 400 entries if user checks 4 entries and wants to donwload only those 4 entries from ALV using Copy to local file option then how should it be done. plea

  • RDS - Issue using Windows 10 build 9926 as Virtual Desktop Infrastructure on Hyper-V 2012 R2

    We currently have a production Windows 8.1 as a VDI/RDS on Hyper-V 2012 R2. On testing the last build of Windows 10 (98??) we had no issues deploying this in same RDS as pooled desktops. The latest build 9926, although correctly sysprep-ed (either by

  • Why can't Firefox recgnize mozsqlite3.dll file, even though it's in the program folder?

    '''bold text'''Did a clean install of Firefox 4, six different times. When I attempt to open Firefox afterwards, a messsage box pops-up with this - "This application has failed to start because sqlite.dll was not found." Each time the folder mozsqlit

  • Java.lang.NullPointerException  while executing ODI package

    hi, while executing some of my packages in ODI 11g.... i m getting the following error java.lang.NullPointerException      at com.sunopsis.dwg.codeinterpretor.SnpGeneratorSQLCIT.treatPopSourceSet(SnpGeneratorSQLCIT.java:7984)      at com.sunopsis.dwg

  • 12 inch won't shut down

    My daughter has a PB 12 inch that has never shut down correctly from day 1. I always figured an update would take care of it and sent her off to school with it. Well, here we are at probably the last Tiger update and no go. When you shut down the com