Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Handler "applicationWillFinishLaunching_" Doesn't Work?

If I put this in my "Appdelegate.applescript" it doesn't work.


on applicationWillFinishLaunching_(aNotification)
        
        say "1 2 3"
  
          end applicationWillFinishLaunching_


Why is that and how can I fix it?

Posted on Sep 7, 2013 4:03 PM

Reply
8 replies

Sep 7, 2013 5:36 PM in response to red_menace

The problem is not using the say command, although yes I did test it in other handlers and through Terminal. The problem is that half the things I put in the handler don't work. The actual code I'm using is:

on applicationWillFinishLaunching_(aNotification)
        
        if application "Skype" is running then
            
            tell application "Skype" to set SkypeState to ((send command "" script name "") as text)
            
            if SkypeState is "COMMAND_PENDING" then
                
                ErrorWindow's orderFront_(sender)
                
                else
                
                my Refresh_()
                
            end if
            
            else
            
            tell application "Skype" to launch
            
        end if
  
          end applicationWillFinishLaunching_

Sep 7, 2013 8:15 PM in response to red_menace

Here is my full console output on 1 run and close.




objc[16657]: Object 0x10011e120 of class NSPathStore2 autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
objc[16657]: Object 0x10011e4e0 of class NSPathStore2 autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
objc[16657]: Object 0x1005023f0 of class __NSArrayM autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
objc[16657]: Object 0x100508060 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
2013-09-07 23:11:03.483 SkypeBot[16657:403] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types:  dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found.  Did find:
          /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
SkypeBot: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.

Handler "applicationWillFinishLaunching_" Doesn't Work?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.