Applescript to quit an applescript
Hi all,
I'm trying to quit an applescript application (so should be an app, no?) through another applescript without results... even when i do a "killall myapp" from the terminal i have this error: "No matching processes belonging to you were found"
How can this be?
The application i want to quit is as simple as this:
delay 400
do shell script "echo try>> /Users/caDesktop/dst.txt"
Thanks!
Your application isn't going to quit if told to quit (directly or via System Events) while it is in that long delay, since it won't get the message until the delay is completed. The shell command killall will terminate the process, but an AppleScript application process does not have the name of the application - it has the name of the executable, which would be applet or droplet.
Similar Messages
-
Help with applescript to quit certain processes by name?
Hey, for anyone who knows how to program applescripts well, I could use some help with the script below.
I'm very new to applescripting and I'm trying to write a script that would automatically quit up to 100 instances of the Google Chrome Renderer process.
Thanks to google, I found a script similar to what I wanted, and after some tinkering I thought I had it just right. The thing is, if I only set the app_name to Google Chrome, it quits Chrome just fine, but when I try it like this, it doesn't receive any data from grep or awk.
If anyone can help I'd really appreciate it.
repeat 100 times
set app_name to "Google Chrome Renderer"
set the_pid to (do shell script "ps ax | grep " & (quoted form of app_name) & " | grep -v grep | awk '{print $1}'")
set new_pid to first word of the_pid
try
if new_pid is not "0" or "1" then do shell script ("kill -9 " & new_pid)
end try
end repeattry this:
tell application "System Events"
set procs to (every process whose name is "Google Chrome Renderer")
if (count of procs) > 100 then
set max to 100
else
set max to count of procs
end if
repeat with i from 1 to max
tell (item i of procs) to quit
end repeat
end tell -
AppleScript Remote Event trying to Quit iCal from another computer
I'm trying to write an AppleScript that will allow me to quit iCal on a particular user's account on my iMac from my MacBook, irrespective of if that user is the active user on the iMac.
I did some research and determined that if I enabled Remote Apple Events on the iMac and used the syntax of
on machine "eppc://[username:password]@[machine name]?uid[userID]"
...I should be able to issue the AppleScript command to quit the application.
Here's the weird bit:
If I use this syntax to :
tell application "Address Book" of machine "eppc://[user:password}@i[machinename]/?uid=[uid#]" to quit
... then that works, for Address Book. However, if I copy and paste the same line, and change Address Book to iCal, it gives me "Unable to Authenticate User" as the error and it won't compile.
Strange strange strange...
[By the way, I didn't find an AppleScript forum... is there one? is there a better place to ask this question?]Did you ever get an answer to this question? I have the same problem on one of several Macs in my office.
This causes a User Authentication error even though the IP address, the user name, and password are correct:
set remoteMac to "eppc://username:password@ipaddress"
using terms from application "Finder"
tell application "Finder" of machine remoteMac
activate
end tell
end using terms from
However, this works fine using the same IP address, user name, and password.
set remoteMac to "eppc://username:password@ipaddress"
using terms from application "Transmit"
tell application "Transmit" of machine remoteMac
activate
end tell
end using terms from -
How to quit an AppleScript programmatically?
I have an applescript that is continually running. Every 60 seconds it opens an application which runs certain processes.
My Problem is that while the applescript is running the computer is not able to restart or shutdown. So I need to capture the shutdown command or the restart command within my applescript so as to stop it and quit.
Any ideas?
My Applescript:
<pre>
tell application "Finder"
repeat until theCount > 200
activate
open application file "FullScreenWindow.app" of folder "TimeSheetDaemon" of startup disk
delay 14400 -- son segundos
end repeat
end tell
</pre>
ThanksHi
You need to use quit and idle handlers in a stay-open application:
--begin script
on idle
tell application "Finder" to open application file "FullScreenWindow.app" of folder "TimeSheetDaemon" of startup disk
return 14400
end idle
on quit
continue quit
end quit
--end script
This way there's no need for an endless repeat loop, and the script app gracefully handles the quit event sent to it by shutdown, restart or logout.
Hope this helps,
H -
I have an AppleScript saved as a run only app which I call every hour from launchd.
Most of the time it works fine, but occasionally something causes the app not to quit when it's done its thing. This means that next time an error is thrown and the process does not run (so it fails until I force quit the app).
I have tried wrapping the whole script in a try...with timeout...end timeout...on error return...end try structure but that makes no difference.
The core of the script is a run shell script that calls a perl script which in turn gets data from a web site. I have tried nesting a try...on errror...end try around this that simply sets the content of the variable that should be populated from the script in the event that any error occurs.
The final part of the script is opening a [text] file and inserting a few lines at the top. Again I have tried wrapping this in a try...on error return...end try stricture.
None of these efforts seems to have any effect. However, I can't get the script to fail when I run it from the ApplScript Editor.
Would I be better to use osascript to call a script rather than the app, or am I doing something more fundamental wrong?I'm not trying to be coy either, but I don't see that posting the whole script is going to help particularly because the perl script uses WWW::Mechanize to get data from a website where I have to provide user credentials - hence, it will not be possible to run it without those credentials.
The expectation is that I will get approximately ten lines of data back (which I put into a local variable). I then use an offset check to determine whether a particular string is present. If it is present, I then go on to compose a message (using Messages) to send to myself.
Regardless of the content, I open a local text file and insert the web response at the beginning of the file (as an activity log). The file is then closed for access and that's it.
I have only once seen an error when I ran the script from the AS Editor and this seemed to indicate a problem with the site's availability - so when Mechanize couldn't find any identifiable data, it threw an error.
The app is not saved as stay open, but it does. All I can say for certain is that the log file does not get written to, so I suspect that the problem lies with the perl script. It is for that reason that I wrapped it in a try...with timeout structure. (My understanding of the timeout, is that if script execution fails to complete within the timeout an error will be thrown, so this is picked-up by the try...on error. That understanding may be wrong.)
So, after all that, here is the script [with a single hard-coded address obscured for privacy]:
try
set desktopPath to (path to desktop) as alias
set FlightCheckLog to (desktopPath as text) & "FlightCheckLog.txt"
set targetList to {"Sep-7", "Sep-8", "Sep-9", "Sep-10"}
tell application "Messages"
set theBuddy to buddy id "<OBSCURED>"
end tell
set messageSent to false
try
with timeout of 300 seconds
set theFlights to do shell script "~/Documents/perl/FilghtCheck.pl -x -c J -d 2013-09-07 ATH-LHR"
end timeout
on error
set theFlights to ""
end try
repeat with theDate in targetList
set theOffset to (offset of theDate in theFlights)
if theOffset is not 0 then
set theFlight to text (theOffset - 5) thru end of theFlights
set theReturn to (offset of return in theFlight)
set theFlight to text 1 thru (theReturn - 1) of theFlight
tell application "Messages"
send theFlight to theBuddy
set messageSent to true
end tell
end if
end repeat
try
set theFile to open for access FlightCheckLog with write permission
get eof theFile
if result > 0 then
set fileText to read theFile
set eof theFile to 0
else
set fileText to ""
end if
if messageSent then
write ((current date) & return & theFlights & return & "MESSAGE SENT" & return & return & fileText) as text to theFile
else
write ((current date) & return & theFlights & return & return & fileText) as text to theFile
end if
close access theFile
on error
return
end try
on error
return
end try -
AppleScript Newbie - Display dialog box when quitting an application
Hello.
I was wondering if it's possible to write a script that displays a dialog box (in this case one saying "BACK UP!!!!") everytime i quit Final Draft.
Thanks.
F.A regular AppleScript does not have the ability to get system notifications, so you would have to do something like have the script continually check (poll) for applications that are running. A Cocoa-AppleScript does have the ability to do Cocoa-y stuff such as register for system notifications, so you can create a new applet (AppleScript Editor > File > New from Template > Cocoa-AppleScript Applet), paste in the following, and save it as an application (uncheck the option to show the startup screen):
property theApps : {"Final Draft"} -- a list of applications to watch for
on run -- example
# add observers for workspace notifications
tell current application's NSWorkspace's sharedWorkspace's notificationCenter
addObserver_selector_name_object_(me, "appQuit:", current application's NSWorkspaceDidTerminateApplicationNotification, missing value)
end tell
-- tell application "Final Draft" to activate
end run
on appQuit_(aNotification) -- an application quit
# aNotification's userInfo record contains an NSRunningApplication instance that we can get properties from
set theApplication to (aNotification's userInfo's NSWorkspaceApplicationKey's localizedName()) as text
if theApplication is in theApps then
tell current application -- me
beep 3
activate -- make sure dialog comes to front
display dialog "BACK UP!!!!" with title "Final Draft quit notice" buttons {"OK"} default button 1
quit
end tell
end if
end appQuit_
When the application is run it will sit there and receive notifications when other applications quit, and checks to see if it was the application you want. -
Unexpected Quits when running AppleScript
Greetings,
As of late, I've been experiencing the Unexpected Quit error every time I run any AppleScript app or even after closing the AppleScript Editor. I have a backup script that runs every night to another hard drive. A very basic script that simply does various rsyncs. In the morning, I notice that there is always an "Unexpected Quit" message on the screen.
Further investigation reveals that that script, and any other that I test, actually does run but seems to crash when closing the script. Same thing when I'm in the editor. I can run the script from within the editor just fine, then when I close the editor, I get the same error.
This all seemed to happen shortly after I installed the latest mouse drivers for my Logitech mouse.
If anyone has any suggests, it would be greatly appreciated.
Below are more details on the error:
Subject: unexpected quit
Headers: Show All Headers
Date/Time: 2008-10-21 22:57:02 -0500
OS Version: 10.3.9 (Build 7W98)
Report Version: 2
Command: Backup App.app
Path: /Library/Scripts/Backup Scripts/Backup App.app
Version: ??? (???)
PID: 766
Thread: 0
Exception: EXC_BREAKPOINT (0x0006)
Code[0]: 0x00000001
Code[1]: 0x9083be80
Thread 0 Crashed:
0 libobjc.A.dylib 0x9083be80 objctrap + 0
1 libobjc.A.dylib 0x9083be14 objcfatal + 0x48
2 libobjc.A.dylib 0x90837c44 objcfatalHeader + 0x44
3 dyld 0x8fe18364 callfuncs_for_removeimage + 0x8c
4 dyld 0x8fe132c4 dyld_unlinkmodule + 0xcc
5 libSystem.B.dylib 0x9003dacc NSUnLinkModule + 0x68
6 com.apple.CoreFoundation 0x90236290 _CFBundleDYLDUnloadBundle + 0x3c
7 com.apple.CoreFoundation 0x9021da00 CFBundleUnloadExecutable + 0xe8
8 com.apple.CoreFoundation 0x9021254c __CFBundleDeallocate + 0x2c
9 com.apple.CoreFoundation 0x901c1848 CFRelease + 0x1e8
10 com.apple.openscripting 0x916e67b0 ZN10shlbentry6UnloadEv + 0x60
11 com.apple.openscripting 0x916e2ef8 _Z18UnloadAllAdditionsv + 0xb4
12 libSystem.B.dylib 0x9002cdb8 exit + 0x58
13 Backup App.app 0x00002a3c 0x1000 + 0x1a3c
14 Backup App.app 0x000028a8 0x1000 + 0x18a8
PPC Thread State:
srr0: 0x9083be80 srr1: 0x0002f030 vrsave: 0x00000000
cr: 0x44002454 xer: 0x20000000 lr: 0x9083be14 ctr: 0x90010a60
r0: 0x9083be10 r1: 0xbfffe9a0 r2: 0xa000057c r3: 0x00000074
r4: 0x00000000 r5: 0x00000074 r6: 0x00000000 r7: 0x00000000
r8: 0x00000000 r9: 0xa0008872 r10: 0x00000006 r11: 0xa00048f0
r12: 0x90010a60 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000
r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0x00000000
r20: 0x00000000 r21: 0x00000000 r22: 0x00000000 r23: 0x00000000
r24: 0x00000000 r25: 0x00000000 r26: 0x00000000 r27: 0x007d1000
r28: 0x007d1000 r29: 0x007d1000 r30: 0xa083f448 r31: 0x9083bddc
Binary Images Description:
0x1000 - 0x2fff Backup App.app /Library/Scripts/Backup Scripts/Backup App.app
0x14000 - 0x14fff com.apple.applescript.component
1.9.3 /System/Library/Components/AppleScript.component/Contents/MacOS/AppleScript
0xbb000 - 0xbefff libMPAEncode0.1.dylib /Library/Application
Support/DivXNetworks/libMPAEncode0.1.dylib
0xfd000 - 0xfdfff com.apple.osax.digihub
1.0 /System/Library/ScriptingAdditions/Digital Hub Scripting.osax/Contents/MacOS/Digital
Hub Scripting
0x25c000 - 0x28dfff liblame3.92.dylib /Library/Application
Support/DivXNetworks/liblame3.92.dylib
0x2ca000 - 0x2dcfff libdpv10.dylib /Library/Application
Support/DivXNetworks/libdpv10.dylib
0x511000 - 0x5dbfff com.divxnetworks.DivXCodec 5.2.1 /Library/QuickTime/DivX
5.component/Contents/MacOS/DivX 5
0x6b4000 - 0x714fff libdpus10.dylib /Library/Application
Support/DivXNetworks/libdpus10.dylib
0x7d1000 - 0x7d9fff com.Logitech.Control Center.Scroll Enhancer OSAX Loader
2.6.0 /Library/ScriptingAdditions/LCC Scroll Enhancer Loader.osax/Contents/MacOS/LCC
Scroll Enhancer Loader
0x55d1000 - 0x5603fff com.apple.osax.standardadditions 1.9.4
(???) /System/Library/ScriptingAdditions/StandardAdditions.osax/Contents/MacOS/Standa rdAdditions
0x80830000 - 0x8090efff libxml2.2.dylib /usr/lib/libxml2.2.dylib
0x81eb0000 - 0x81eb3fff libmx.A.dylib /usr/lib/libmx.A.dylib
0x835f0000 - 0x835f8fff libbsm.dylib /usr/lib/libbsm.dylib
0x845c0000 - 0x845c9fff libz.1.1.3.dylib /usr/lib/libz.1.1.3.dylib
0x845e0000 - 0x8460dfff libssl.0.9.dylib /usr/lib/libssl.0.9.dylib
0x84b81000 - 0x84b9dfff com.apple.AppleShareClient 1.3.2
(1.3.3) /System/Library/Frameworks/AppleShareClient.framework/Versions/A/AppleShareClie nt
0x85fee000 - 0x86072fff libstdc++.6.dylib /usr/lib/libstdc++.6.dylib
0x867f9000 - 0x8689afff com.apple.QuickTimeImporters.component 7.5
(861) /System/Library/QuickTime/QuickTimeImporters.component/Contents/MacOS/QuickTime Importers
0x87b90000 - 0x87bcbfff com.apple.AppleShareClientCore
1.3.3 /System/Library/Frameworks/AppleShareClientCore.framework/Versions/A/AppleShare ClientCore
0x88080000 - 0x881b6fff com.apple.vImage
1.2.0 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.fr amework/Versions/A/vImage
0x8bde2000 - 0x8bdf2fff com.apple.Accelerate.vecLib 3.0.3 (vecLib
3.0.3) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/vecLib
0x8c2cd000 - 0x8c2d5fff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib
0x8c81d000 - 0x8c81dfff com.apple.Accelerate 1.0.3 (Accelerate
1.0.3) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x8ed84000 - 0x8ee29fff com.apple.applescript
1.9.3 /System/Library/PrivateFrameworks/AppleScript.framework/Versions/A/AppleScript
0x8fe00000 - 0x8fe4ffff dyld /usr/lib/dyld
0x90000000 - 0x9014ffff libSystem.B.dylib /usr/lib/libSystem.B.dylib
0x901c0000 - 0x9026efff com.apple.CoreFoundation 6.3.10
(299.39) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x902b0000 - 0x90529fff com.apple.CoreServices.CarbonCore 10.3.9
(558) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonC ore.framework/Versions/A/CarbonCore
0x90584000 - 0x905f3fff com.apple.framework.IOKit 1.3.6
(???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x90610000 - 0x9069afff com.apple.CoreServices.OSServices
3.0.1 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServi ces.framework/Versions/A/OSServices
0x90700000 - 0x90700fff com.apple.CoreServices 10.3
(???) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x90702000 - 0x90775fff com.apple.NavigationServices
3.3.3 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationSer vices.framework/Versions/A/NavigationServices
0x907c7000 - 0x907e1fff libPDFRIP.A.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libPDFRIP.A.dylib
0x907f0000 - 0x907f9fff com.apple.DiskArbitration
2.0.5 /System/Library/PrivateFrameworks/DiskArbitration.framework/Versions/A/DiskArbi tration
0x90810000 - 0x90810fff com.apple.ApplicationServices 1.0
(???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Application Services
0x90830000 - 0x9089ffff libobjc.A.dylib /usr/lib/libobjc.A.dylib
0x908c5000 - 0x908d5fff com.apple.vecLib 3.0.3 (vecLib
3.0.3) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
0x9090f000 - 0x90922fff com.apple.speech.synthesis.framework
3.2 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x90940000 - 0x909b3fff com.apple.DesktopServices
1.2.6 /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/Desk topServicesPriv
0x909f0000 - 0x90a04fff libCGATS.A.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib
0x90a20000 - 0x90b7bfff com.apple.Foundation 6.3.11
(500.65) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x90c32000 - 0x90c3cfff com.apple.framework.AppleTalk 1.2.0
(???) /System/Library/Frameworks/AppleTalk.framework/Versions/A/AppleTalk
0x90c60000 - 0x90cc2fff libGLU.dylib
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x90d20000 - 0x90d3bfff com.apple.SystemConfiguration 1.7.1
(???) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfi guration
0x90d60000 - 0x90d6bfff com.apple.opengl
1.3.8 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x90d72000 - 0x90d89fff com.apple.LangAnalysis
1.5.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ LangAnalysis.framework/Versions/A/LangAnalysis
0x90d95000 - 0x90da1fff com.apple.help
1.0.1 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framewor k/Versions/A/Help
0x90dab000 - 0x90db8fff com.apple.CommonPanels 1.2.1
(1.0) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels. framework/Versions/A/CommonPanels
0x90e92000 - 0x90eacfff libresolv.9.dylib /usr/lib/libresolv.9.dylib
0x90ec0000 - 0x90ec0fff com.apple.Cocoa 6.3
(???) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
0x910e0000 - 0x910e3fff com.apple.URLMount
2.1.4 /System/Library/PrivateFrameworks/URLMount.framework/Versions/A/URLMount
0x913a0000 - 0x9145ffff ColorSync
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ColorSync.framework/Versions/A/ColorSync
0x9155d000 - 0x91571fff libcups.2.dylib /usr/lib/libcups.2.dylib
0x915cb000 - 0x915d4fff libz.1.dylib /usr/lib/libz.1.dylib
0x915e0000 - 0x91699fff com.apple.QD 3.4.74
(???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ QD.framework/Versions/A/QD
0x916d9000 - 0x916f3fff com.apple.openscripting 1.2.1
(???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting .framework/Versions/A/OpenScripting
0x91720000 - 0x917b3fff com.apple.print.framework.PrintCore
3.3 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ PrintCore.framework/Versions/A/PrintCore
0x917f6000 - 0x91806fff com.apple.ImageCapture
2.1.5 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture. framework/Versions/A/ImageCapture
0x91b20000 - 0x91b2bfff libCSync.A.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
0x91b50000 - 0x91b5ffff libPSRIP.A.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libPSRIP.A.dylib
0x91bc0000 - 0x91bd3fff libRIP.A.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
0x91e0c000 - 0x91e26fff libGL.dylib
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x91f5a000 - 0x91f6afff com.apple.speech.recognition.framework
3.3 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecogni tion.framework/Versions/A/SpeechRecognition
0x920c9000 - 0x920c9fff com.apple.Carbon 10.3
(???) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x920f0000 - 0x92116fff com.apple.FindByContent 1.4
(1.2) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ FindByContent.framework/Versions/A/FindByContent
0x92170000 - 0x92358fff com.apple.security 2.5
(29780) /System/Library/Frameworks/Security.framework/Versions/A/Security
0x926bd000 - 0x92711fff com.apple.bom 1.2.8
(64.2) /System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom
0x92722000 - 0x92770fff com.apple.print.framework.Print
3.3 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framewo rk/Versions/A/Print
0x927f0000 - 0x92827fff com.apple.CFNetwork 1.2.6
(71.13) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwo rk.framework/Versions/A/CFNetwork
0x92867000 - 0x92872fff com.apple.securityhi 1.2
(90) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.fr amework/Versions/A/SecurityHI
0x92880000 - 0x92c05fff com.apple.HIToolbox 1.3.7
(???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.fra mework/Versions/A/HIToolbox
0x92d7c000 - 0x92db4fff com.apple.LaunchServices 10.3.5
(98.4) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ LaunchServices.framework/Versions/A/LaunchServices
0x93680000 - 0x93958fff com.apple.CoreGraphics 1.203.33
(???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/CoreGraphics
0x939d1000 - 0x93a21fff com.apple.HIServices 1.4.1
(0.0.1d1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ HIServices.framework/Versions/A/HIServices
0x93a50000 - 0x93a54fff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib
0x943d0000 - 0x94508fff edu.mit.Kerberos 5.0.27
(5.0.1) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x94580000 - 0x94a7ffff com.apple.AppKit 6.3.11
(743.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x94ea0000 - 0x954a6fff libBLAS.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libBLAS.dylib
0x95500000 - 0x957d0fff libLAPACK.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libLAPACK.dylib
0x957ea000 - 0x9588dfff libcrypto.0.9.dylib /usr/lib/libcrypto.0.9.dylib
0x958e0000 - 0x95900fff libvMisc.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libvMisc.dylib
0x95b50000 - 0x95c32fff libicucore.A.dylib /usr/lib/libicucore.A.dylib
0x95c84000 - 0x95d10fff com.apple.ink.framework 101.1.4
(55.12) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework /Versions/A/Ink
0x95e40000 - 0x95eadfff libvDSP.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libvDSP.dylib
0x95ec2000 - 0x95efafff com.apple.AE
1.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ AE.framework/Versions/A/AE
0x95f30000 - 0x9601efff libiconv.2.dylib /usr/lib/libiconv.2.dylib
0x960f2000 - 0x9615bfff com.apple.htmlrendering
1.1.2 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering .framework/Versions/A/HTMLRendering
0x96980000 - 0x96a47fff libcrypto.0.9.7.dylib /usr/lib/libcrypto.0.9.7.dylib
0x96aa0000 - 0x96acefff libssl.0.9.7.dylib /usr/lib/libssl.0.9.7.dylib
0x96b50000 - 0x96bdffff ATS
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/ATS
0x96c8e000 - 0x96cedfff com.apple.SearchKit
1.0.2 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchK it.framework/Versions/A/SearchKit
0x96d2b000 - 0x96d43fff com.apple.WebServices 1.1.1
(1.1.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServ icesCore.framework/Versions/A/WebServicesCore
0x98779000 - 0x98aa5fff com.apple.QuickTime 7.5.0
(861) /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
0x99000000 - 0x990b8fff com.apple.audio.toolbox.AudioToolbox
1.3.4 /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x99106000 - 0x99106fff com.apple.audio.units.AudioUnit
1.3.3 /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x99108000 - 0x99125fff com.apple.audio.SoundManager
3.9 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.f ramework/Versions/A/CarbonSound
0x99137000 - 0x9919efff com.apple.audio.CoreAudio
2.1.3 /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x991de000 - 0x991f4fff com.apple.QuartzCore
1.3 /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0xefbef000 - 0xefcd1fff libPSIKey.dylib /Library/Application
Support/DivXNetworks/libPSIKey.dylibHi there and thanks for your quick reply ..previewing .. I mean listening to tracks I have selected on my arrange page and then muting some I dislike and previewing or selecting another track to listen .(solo) .. whenever I do this .. I get an error states.. your memory is getting short ..and boom right then and there the program quits... Also is there a way I can instruct Logic to make copies for every single wav I am audiotioning within (or inside) the folder in wihch I am currently working.. It seems to always dump the recorded sessions from vocals or mic or even outboard gear into .. MacHD/Music/Logic.. how do I change this .? although my biggest concern of course are the crashes.. thanks very much in advance for your help..
pedro -
So I downloaded the wrong Airplane Mode program for my operating system and I now have AppleScript Error message. It will not allow me to quit the program. Also, once that happens how do I remove the program from the computer?
What Airplane Mode program? To stop a running program launch Activity Monitor (in utilities folder) and quit the program from there. To remove the program drag it to the trash or better use the uninstaller that should have come with it.
-
I need a little help. I have written an AppleScript app that "touches" one of my external drives every 55 seconds to keep it from spinning down. However, this app won't quit when I depress command-Q ... even though I have included an "on quit" handler. Can anyone suggest what I need to change to have this app respond properly to command-Q? Here's the script:
with timeout of 99999999 seconds
tell application "Finder"
activate
repeat
do shell script "touch -a /Volumes/TimeMachine/.TemporaryItems"
delay 55
end repeat
end tell
end timeout
on quit
continue quit
end quitAppleScript is not multi-threaded, so the application will never get the quit message because the repeat loop never finishes. Sitting in a continual repeat loop is not the way to go since it blocks the user interface - instead, resave your application with the option to stay open, and use the idle handler (note that the Finder is not needed for the do shell script command):
on idle
do shell script "touch -a /Volumes/TimeMachine/.TemporaryItems"
return 55
end idle -
Need applescript help, quit application upon sleep
I have never worked with applescript before, so I am completely lost. I have a program that does not like to 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?
Thanks,
BrandonSleepWatcher - A utility to run tasks on sleep/wake
-
Applescript quit infinite looping when restart/logout/shutdown
recently I have a infinite looping applescript, and I save the is script as a "app", and running it on my macbook.
my problem was when every time I want to restart the OS, it keep saying my app can't be quit, and I have to force quit.
Anyway to write the script auto detect the shutdown/logout and restart, so there I can use the "quit" handle.
on quit
continue quit
end quit
repeat
end repeatThere exists, however, a very inelegant solution: using two stay-open apps at the same time, as follows:
App_1
global flag
set flag to false
on quit
set flag to true
end quit
repeat
if flag then exit repeat
end repeat
continue quit
App_2
on quit
try
tell application "System Events"
set frontmost of process "App_1" to true
delay 1
keystroke "q" using {command down}
end tell
delay 1
end try
continue quit
end quit
I'm sure though someone else will find a very simple and elegant solution. -
Hello, I am creating an AppleScript app and have a button for quitting the app. What is the script so I can quit my app?
ThanksIn your button handler you can use a statement such as:
tell me to quit -- OK
-- or --
current application's NSApp's terminate() -- better
If there isn't anything else that your button handler is doing, you can also just connect it to the application's terminate action (this will work the same as selecting the quit menu item) - in IB, select the Application object, look in the Connection Inspector for the terminate: action, and drag a connection to the button. -
Key binding to quit an applescript app as an alternative to 'Force Quit'
Hello,
I have an AppleScript App which is running for a hour. It is basically a GUI scripting.
If I want to quit the app in between, I am unable to use 'Force Quit' as the mouse/key board is extensively used by the app.
I wish to know some alternatives for this issue.
note:
Is there anyway I can bind some key combination and once it is pressed, the app should quit?+Any suggestions to handle this issue?+
You can quit a script that is saved as an 'application bundle' with another script.
Open the 'application bundle' and drag the 'applet' file between the quotes...
tell application "" to quit
and you will get this, but with a different path.
tell application "/Users/tom/Login Items/ReniceR.app/Contents/MacOS/applet" to quit -
Applescript to quit a daemon?
So, now and then I need to quit/kill/restart a daemon. Well, I use other Applescripts to quit applications, but apparently, quitting a daemon is not the same. Both show up in the Activity Monitor, but trying to apply a quit and app type script to a "daemon" does not work. I like to use an applescript as then I can just click it and it runs versus having to open Activity Monitor, searching for the daemon, selecting and quitting. 1 click versus like 5 clicks.
For example, I use this to quit an app..
tell application "Dock" to quit
but trying to put in a daemon service in place of "Dock" app does not work becuase this script is looking for an "application"
So, does anyone know of a simple script just like this that can be written to quit a daemon?Just killing a daemon will not necessarily restart it. How is the daemon started in the first place? It would also help if you told us which daemon you are referring to here.
In OS X background processes like this are controlled using launchd/launchctl. It would be best if you worked within that system.
So just killing the process isn;t the answer unless you do not what it started up again.
it is one for an app that unless the daemon is restarted a portion of the visual monitor displayed in the apple menu will not work.
Interesting, could you share the name of this program and what ir does ?
Just like I run a 1 click applescript to kill my dock to regain control of my widgets (as that is an issues no one has ever been able to solve, but a different issue posted about elsewhere).
What issue is this?
BTW what version of the OS are you running that might also affect the answer.
regards -
I'm trying to build an AppleScript that will connect to a VPN, and I've come up with the following:
tell application "System Events"
tell current location of network preferences
set VPNservice to service "OverplayVPN" -- name of the VPN service
if exists VPNservice then connect VPNservice
set isConnected to connected of current configuration of VPNservice
repeat while isConnected is false
delay 2
set isConnected to connected of current configuration of VPNservice
end repeat
if isConnected then
tell application "Finder"
display dialog "VPN connected"
end tell
end if
end tell
end tell
quit
It seems to work well. I'm running the .app file from "Login Items" within "Users and Groups".
My problem is, that I can't get the application to quit. Whenever I close my computer I have to Force Quit the script in order to shut down my Macbook Pro.
Any idea why the script does not quit by itself (after I've responded to the dialog box)?
Any idea why a normal "Shut Down" isn't able to quit the script?Remove the 'quit' statement at the end. It isn't needed - a script will automatically quit when the last statement executes.
-
Applescript to quit an application
I have a very simple Applescript written and saved as an application to quit GoodSync, a syncing program. When I run the script from within applescript the application quits. When I run the application as a stand alone it fires but does not quit the application.
any ideas?
tell application "GoodSync"
quit
end tell
The applicaton does not ask to save anything on quit.
I have used automator to the same end and it works as a stand alone application.
Eager to learn,
Thanks in advance,
DebbieFrank,
The Shell works but sends back a bunch of errors.
tell application "System Events"
get unix id of every process whose name = "GoodSync"
--> {4370}
do shell script "kill -9 4370"
--> error number -1708
«event ascrgdut»
--> error number -1708
do shell script "kill -9 4370"
--> error number -10004
end tell
tell current application
do shell script "kill -9 4370"
--> ""
end tell
Result:
I am not familiar enough with the coding and errors of AppleScript to determine if I need to worry. The computer also told me that my external hard drive was not ejected properly not long after I ran this script.
Thank you again,
Debbie
Maybe you are looking for
-
I'm using a new computer. All my music is on an external hard drive and I want it to stay there. Before installing iTunes on the new computer, I followed turingtest2's instructions as to the layout of all the iTunes folders (Itunes folder, Itunes M
-
Best specs to run Photoshop CS6 on a MacBook Pro.
Hi, I am considering a MBP for all my photoshop work. Currently using Photoshop CS6 From 2007-2010 I had my old MBP (late 2006 model). Then in 2011 I was using the 2011 iMac, 2.5ghz, 4gb ram. I sold the iMac as I felt more comfortble with the laptop
-
Macbook Pro Off-Center on LCD TV
I am wanting to use my Macbook Pro hooked to a Samsung 32" LCD TV as a secondary display. When I attempt to set the Samsung resolution to 1360x768 in Mac's display preference, the image is off-center with a black band down the left side of the tv. I
-
No RADIUS accounting with SF 302?
Hello all, I have configured my SF 302-08P switch to perform 802.1X & MAC authentication. This works fine in both cases but I cannot get the switch to send accounting requests to my RADIUS server. Even when the server sends back an Acct-Interim-Inter
-
Windows 8.1 Error (Blue Screen) DRIVER IRQL NOT LESS THAN OR EQUA
i need help with this its been very annoying every time i try to play a game after few minutes win 8 show and error and blue screeen apprear's sorry we have encountered a problem DRIVER IRQL NOT LESS THAN OR EQUAL please help me fix this my laptop H