This enables us to register for launching and termination of applications, using the shared instance of the NSWorkspace class: It shows that AppleScript (which is a pretty funny language) is able to work with the Cocoa framework. Clearly this are needless steps for any programmer, so I searched a bit for this problem and found a helpful starting point in the following StackOverflow question: Close App A when App B closes: Mac OS X 10.7.3. So when opening Matlab, first I would need to close Flexiglass. For me this was Flexiglass, and it produced an Java error in Matlab on almost any GUI action (Although is seems that this only occurs in a multi-monitor setup). When the checkbox in System Preferences > Accessibility > Enable access for assistive devices is checked, there is somewhere on your system an application that requires it. Second, there is a strange and irritating problem with Matlab and applications that use the Mac OS X support for assistive devices, such as (in my case) Flexiglass. After using Matlab there is no need for the connection, so every time I am done with it, I have to terminate the VPN-client. Only then the Matlab application can load successfully. First, my license of Matlab requires me to setup a VPN-connection to my university. I had two applications which needed to be opened and closed. The task to automate was my Matlab-workflow. ![]() I will show my approach and problems I found. Thanks to AppleScript this is an “easy” task. The steps are fast to perform, but still… it just feels… wrong. Every now and then you find yourself doing a repetitive tasks consisting of a few small steps.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |