• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: App not found action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App not found action


  • Subject: Re: App not found action
  • From: Robert Poland <email@hidden>
  • Date: Sun, 23 Nov 2014 17:37:09 -0700

> On Nov 23, 2014, at 3:09:PM, Emmanuel LEVY <email@hidden> wrote:
>
> We have the same problem: we want to compile scripts which call Safari without launching Safari. Probably some better solution exists these days, but in case it helps here is what we do:
>
> 1. instead of: tell application "Safari" we prevent AS to guess what app we are calling by writing for instance: tell application ("Saf" & "ari"),
> 2. we use the 4-char codes instead of the normal terminology, which gives horrible stuff like:
> 	tell application ("Saf" & "ari") to set res to «event sfridojs» theScript given «class dcnm»:document 1

 ("BOINC" & "Manager”) didn’t fool the system.

> We use Smile's "tell / Copy translate" commands to provide the 4-char codes.

Since I don’t recognize this I looked in Smiles Dictionary, didn’t find it. Not in Bing either.

Ended up using Application ID, “edu.berkeley.boinc".

> Best,
> Emmanuel
>
>
> On Nov 23, 2014, at 10:37 PM, Robert Poland wrote:
>
>> Hi,
>>
>> The snippets below are meant to run as an app on several computers as a morning startup. Several apps are meant to excluded on “Smaller” computers.
>>
>> PROBLEM;
>> On a “Smaller” computer BOINCManager is not installed. So it causes the script to stop, wanting BOINCManager to be found. Why does’t the try block avoid this, how do I avoid this?
>>
>> tell (do shell script "/usr/sbin/system_profiler SPDisplaysDataType | grep Resolution") to set {screenWidth} to {word 2 as number} -- get screen width of monitor
>> if screenWidth > 2000 then
>> 	set largeMonitor to true
>> else
>> 	set largeMonitor to false
>> end if
>>
>> tell application "System Events"
>> 	set processlist to name of every process
>> 	ignoring application responses
>> 		try
>> 			if largeMonitor then if "BOINCManager" is not in processlist then launch application "BOINCManager.app"
>> 		end try
>> 	end ignoring
>> end tell
>>
>> TIA,
>>
>> Robert Poland
>> Fort Collins CO

Robert Poland
Fort Collins CO


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


References: 
 >App not found action (From: Robert Poland <email@hidden>)
 >Re: App not found action (From: Emmanuel LEVY <email@hidden>)

  • Prev by Date: Re: App not found action
  • Next by Date: Re: Scripting alerts
  • Previous by thread: Re: App not found action
  • Next by thread: Re: App not found action
  • Index(es):
    • Date
    • Thread