OS X Technologies :: Way To Detect Application Running
Apr 24, 2012how can i do a script which does one thing if it finds one application running, and does another thing if it finds the same application not running?
View 3 Replieshow can i do a script which does one thing if it finds one application running, and does another thing if it finds the same application not running?
View 3 Repliesunable to detect usb stick in w7.
Info:
MacBook Air, Mac OS X (10.7.3)
Script to detect when USB stick is plugged to my mac.
View 11 Replies View RelatedI can change the volume level from the command line using this command, For example: osascript -e 'set Volume 3'. Is there a way to detect the current volume level using a similar command and a way to assign it to a variable? And just for good measure, are there similar commands for detecting and setting the current balance?
Info:
iMac, Mac OS X (10.6.7), MySQL 5.1, Perl 5.10, Apache 2.2
I'm looking for an applescript to detect if a cd is inside my mac, if cd inside (possible to detect if empty?) do one thing.Otherwise do another thing.Â
View 6 Replies View RelatedThis works: tell application "System Events" to try if exists process "Safari" then tell application "Safari" to quit saving noon error do shell script "killall Safari"end try And this does not work  tell application "System Events" to try if exists process "Ovolab Phlink" then tell application "Ovolab Phlink" to quit saving noon error do shell script "killall Ovolab Phlink"end try Â
it hangs on the word 'no' and gives message: Syntax error Expected end of line but found application constant or consideration. Ovolab Phlink excists of course on my HD. Â
If I take out the second 'Ovolab Phlink' and replace it with 'Safari', it does not hang (and does not work).Â
Info:
MBP, MM, MBP - 10.6 + Windooz XP on a hard partition
I'm creating an AppleScript application bundle that relies on a separate application. I want to add this application to my bundle and then call it via "tell application xyz ... end tell"Â
So far I have been unable to make AppleScript see this application, except when I gave it the absolute path of where it is located. Obviously, as soon as my application bundle is moved to a different directory this will not work anymore so is not a solution. Tinkering with "path to me" and thus creating the current path to the bundled application also does not work, when saving the script, ScriptEditor tries to find the application and see if the commands I want to tell it exist btu fails and consequently does not save.Â
I tried putting the application into the Contents, Contents:MacOS, and Contents:Resources folders, all without success.Â
I have never worked with applescript before, so I am completely lost. I have a program that does not like to be open when the computer goes to sleep. I usually remember to close the app, but sometimes I forget and get myself in trouble. If I do forget, very bad things can happen to the database of the program, so it is imperative that it is closed.
I am hoping there is an applescript that will quit the application if I put my laptop to sleep, usually by closing the lid. I don't want to trigger the sleep with the applescript, just something that will see that the computer is going to sleep and quit the application before it happens. Is this possible, and if so, how do I go about doing it?
Info:
MacBook Pro (15-inch Mid 2009), Mac OS X (10.7.4)
If im running on OS 10.5.8, do i need to update this too?
View 2 Replies View RelatedI have a multi-step automator workflow that has an embedded "Launch Application" step that calls an applescript application that I've written. The application goes through a list of URLs. I don't want the workflow to start with the next step until my application has cycled through all the URLs. Currently, I have hard coded a pause into the workflow, but I'm looking for something more precise (if I set the pause too long, it results in unnecessary delays, if I set it too short, my workflow gets messed up).Â
I'm assuming there is some way to modify my application and/or the workflow to send a complete status that can trigger the next step in my workflow.
Info:
Applescript, Mac OS X (10.7.2)
I had been using automator quite successfully until recently now I'm unable to get automator to step through even the most basic setup. It refuses to step through to the second action and perpetually runs without producing any results as the image below shows.for any of my automator setups I get results for the first step and then an indefinate hang on the second leaving the step icon greyed out. I have tried this with numerous other actions like calendars etc but to no avail. Below are the very basic automator steps I'm using in this example.Â
Info:
iMac, Mac OS X (10.7.2)
How can I correct this error?
Could not open configuration file /Library/FileMaker Server/Admin/admin-helper/WEB-INF/conf/fmi-test.conf: No such file or directoryÂ
How do I remove Flashback Malware from a Mac running OS 10.5.8?
Info:Mac Pro, Mac OS X (10.5.8)
I am having difficulty in slow in some locations and as especially in the facebook site
Info:
MacBook
Pro, Mac OS X (10.7.3)
I am trying to write a generic script that will mount a disk upon log in of a user So far I have this: (which works for a specific user:)Â
try
mount volume "smb://MyUserName:MyPassWords@ServerIAmPointingTo"
end try Â
I have pointed the script to my log in prefernces so it runs automatically when I log in. Is there a way to do this with a generic username/password? If I wanted to give this script to 100 of my co-workers, they would all have to modify the code to their credeintals. But is there any defaut usernames or passwords that AppleScript will take?  Maybe something like: mount volume "smb://default:default@ServerIAmPointingTo" ...? My goal for this script is to have it run on peoples desktops at work to point to the same server, since I work in IT. But, I don't want to modify each script for each unique person.Â
Does one have to install a base Java before running this update, or is it a full installer?
Info:
iMac, Mac OS X (10.7.3), Lee's computer
Does anyone have some experience running multiple folder actions at the same time? I've written a Applescript folder action that processes some files. When adding some files, the script starts and all goes well. The processing of each file takes a few minutes, but all files are processed correctly. However, when adding some new files to the dropfolder, while the folder action is all ready processing other files dropped a few minutes earlier, the process that is all ready running immediately aborts and the folder action is relaunched on the new files, leaving the old files for what they are.The same problem occurs with multiple folders, each having a folder action attached. When dropping files in "Folder A", the script starts processing. But if someone droppes files in "Folder B", The script of folder A aborts, and the script of folder B starts processing. When adding more files to the folders, the result is the same. In some casses, when the last dropped files are processed, the os continues where the operation was aborted on the previous files. But this not always happens. To make things worse, when you remove the items from the folders afterwords, the folder actions starts running again on items no longer present in the folder ..Does anyone know how I can prevent the folder action being aborted when new files are dropped and placing the new files in "Hold", until the previous files are processed? How can I prevent a folder action being aborted when a item is dropped into another folder? I've written a small script to test this behaviour. Just create one or more folders and attach the script below. Drop a item into the folder, wait a few seconds and drop another one in the same or another folder. To monitor what happens please check the console. [code]
Info:
Mac OS X (10.6.8)
Trying to run the following command as a Launch Agent (OS X 10.7): /usr/bin/find /Users/username/Documents/Dropbox/Public -type f -mtime +2 -print0 | xargs -0 rm -rÂ
Created a plist file (reproduced below) and saved to ~/Library/Launch Agents, but the command isn't executed either at the specified time or when the agent is loaded via launchctl. If I change the command to a simple Applescript test: osascript -e 'tell Application "Finder" to display dialog "hello"'Â
It runs correctly as a launch agent when loaded and as the specified time Which means there's something wrong with the first command (find). But the command runs as written when executed manually in the terminal. Â
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
[Code].....
Is there a way to pause a running application? I don't want to quit out of it, but I don't want it to hog my cpu either (what it's using it for, I don't know since it's just frozen on a menu screen). I would think that "Activity Monitor" has something for it, but I didn't see anything.
View 2 Replies View RelatedI have had terrible problems with my Mac Mini. Apple has replaced the hard drive twice, the SATA cable once and the optical drive once in the first year I've had it. After the latest installation of Lion, I have had repeated problems with the error "Your Mac OS x startup disk has no more space available for application memory." This is false -- I have less than half of my 500 GB in use and 4 GB of wired memory.Â
I believe that Safari is always running when I get this error. Also, I cannot cleanly quit Safari -- I always must force quit, b/c it hangs when I quit. The last time I got this message, Safari was using 1.26 GB of memory. Â
My System Memory report is all out of whack:Â
VM size: 221.25 GB
Page ins: 1.59 GB
Page outs: 40.15 GB
Swap used: 59 GBÂ
This is after only 1 or 2 days of uptime. I have just a couple of weeks left on my Apple Care and am desperate to know if this is hardware problem requiring my 5th trip to the Genius Bar or if this some kind of software problem that I can fix.Â
On this latest Lion install, I did a clean install with no settings or applications, and I killed extensions on Safari.Â
Info:
Mac mini, Mac OS X (10.7.3), Mid-2010 MacMini
How do I delete an application from macbook pro
Info:
MacBook Pro (13-inch Late 2011), Mac OS X (10.7.4)
How can I run mail.app remotely on a Mac? I have a desktop and a laptop, both on 10.4.11. The desktop has my mail files, and sometimes I'd like to read them from the laptop. The laptop can log into the desktop over my wireless home network and I can run the copy of mail.app that's on the desktop. But when I do that, it looks for mail files that are on the laptop rather than the desktop.
View 3 Replies View RelatedI'm used to KDE and Gnome, where if I close an app, it's closed, end of. No more consuming processor power and no need to go round housekeeping and right-click+quit. Please help me understand how to change the behaviour of my Mac mini so when I click the little red X, the app closes properly.
View 5 Replies View RelatedHas anyone tried running iWork as a portable app? Are there any particular methods to make it work? If this doesn't work can anyone point me in the direction of a portable app that opens .pages documents?
View 4 Replies View Relatedhow to stop running application in iphone 3gs
Info:
iPhone 3GS, iOS 4.1
Somehow, Quicken became broken so I replaced it with new copy and moved old to trash. When trying to empty trash I get the message that the application is still in use and can't remove. When I take the app out of trash and try to open it I get the message "Application is broken or incomplete."
Apparently, some part of the application failed to shut down and continues to run. It does not appear in the list when I try to force quit. Whatever it is that's running is either a memory hog or takes up too much CPU time because the whole system slows down to a point that I can't do any work (just get the spinning color wheel) and I have to manually force system shut-down.
When I restart the computer all works okay (but slow) and starts to degrade over time until the system runs out of whatever resource Quicken is using. Question is: How can I delete this application and eliminate the problem.Â
Info:
iMac, OS X Mavericks (10.9.4)
I recently found that the cause for my macbook pro hanging on shut down was due to Kaspersky running in the background. Because quiting it before shutting down every time is annoying is there a way to automate the quitting of an application when I request my computer to shut down?Â
Info:
MacBook Pro, Mac OS X (10.7.3), Logic Pro 9
I recently found that the cause for my macbook pro hanging on shut down was due to Kaspersky running in the background. Because quiting it before shutting down every time is annoying is there a way to automate the quitting of an application when I request my computer to shut down?
Info:MacBookPro, Mac OS X (10.7.3), Logic Pro 9
I play the Elder Scrolls Online and was trying to tweak around with the game's settings to get the most frames possbile while running the game with a high level of rendering samples. I did this by lowering the game's window resolution by one level while in full screen. However, after a recent update the game's true full screen no longer works and I'm unable to change the game's in-game resolution. The game automatically sets itself to my Macbook Pro's native display, and this results in a frame rate drop.Â
As a workaround, at least until it was fixed, I would lower my Macbook's native display before running the game, and restore it when I was finished playing. This was tedious to me, and I looked around for a program that would automatically change the display on a specfic application's startup or exit. I found SwitchResX at [URL] and wanted to try it. I made it so that the resolution would switch to 1280 x 800 whenever ESO was loaded. It worked fine, but I wanted to do a comparision of frames at the normal resolution to see if it actually fixed anything. This is where my problem lies: after closing ESO and disabling the SwitchResX setting, the entire screen shrinks down to a small square whenever I run other applications (initially I thought it was just with ESO, but I found out that more programs were affected while typing this), and most of it is surrounded by a big black border:Â
(You can see the tool bar and the application dock hanging in the middle of the screen)
I've tried:
Uninstalling SwitchResX
Changing the display
Changing the display while running the programs affected
Soft Reseting
Hard Rereseting
A NVRAM Reset
Info:
MacBook Pro with Retina display, OS X Mountain Lion (10.8.4)
I was wondering if anybody out there may know why this is happening to my iCal dock icon. When the app is not running, the date on the icon is displaced by like 15px, then when it is launched, the date goes back to the correct position. Check it out:
View 2 Replies View Related