2 Replies Latest reply on Apr 30, 2012 11:55 AM by vcirilli

    Applescript Gurus?



      FMPA v12

      MAC OSX 10.7.3


      I'm using applescript to trigger system events in a background audio application.

      EX. To hit a PLAY button, to locate the timeline to specific time codes.


      Some events I can trigger in the audio app without bringing it to the front others I have to bring the audio app

      frontmost, trigger the key stroke then return to FM.


      In this latter scenario when FM returns to the front the mouse icon cursor becomes the spinning beachball or the cloverleaf+period.


      FM is not hung at all, and just moving the mouse a bit returns the mouse icon to the typical pointer.


      All the functionality is working as expected, I don't like the cursor anomaly as it will confuse the user.


      Any AS gurus out there that may have some light to shed?


      Thanks in advance.





      tell application "System Events"


      set appName to the name of the current application // get FM ver


      tell process "Pro Tools"

      set frontmost to 1

      end tell


      key code 39 // next boundry key stroke


      tell process appName

      set frontmost to 1

      end tell


      end tell

        • 1. Re: Applescript Gurus?



          It sounds like FM isn't refreshing the cursor when it has been activated as if it's still waiting on some further input that moving the mouse is providing. What about moving the cursor to a slightly different position after returning to FM, or going to an object on the layout to update its focus? I haven't had to do this before so I'm not certain it will work but worth a try.




          Damon Casey.

          • 2. Re: Applescript Gurus?

            Damon thanks for the reply.


            I added a goto object step after applescript returns to FM,  This got the closest to getting rid of the cursor anomoly, it happens a lot less

            but it still happens.  I'm going to try messing with the timming a bit.