Import AppleScript methods in another AppleScript?
        Posted  
        
            by DASKAjA
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by DASKAjA
        
        
        
        Published on 2010-04-09T09:02:43Z
        Indexed on 
            2010/04/10
            21:13 UTC
        
        
        Read the original article
        Hit count: 705
        
Is there a way to use defined AppleScript methods in other AppleScripts which reference the original AppleScript with something similar to import (f.e. in PHP)?
I wrote a methode to set Skype status and mood-text:
on setSkypeStatus(status, mood_text)
    tell application "System Events"
        set skypeRunning to count (every process whose name is "Skype")
        if skypeRunning > 0 then --only set status if skype is running
            tell application "Skype"
                set myStatus to "SET USERSTATUS " & status
                set myMood to "SET PROFILE MOOD_TEXT " & mood_text
                send command myStatus script name "AppleScript"
                send command myMood script name "AppleScript"
                return skypeRunning
            end tell
        else
            return skypeRunning
        end if
    end tell
end setSkypeStatus
now I'm searching for something like import skype_methods.scpt. Is there such a functionality. I can't something related with Google.
© Stack Overflow or respective owner