Re: What's the REAL problem, please?
Re: What's the REAL problem, please?
- Subject: Re: What's the REAL problem, please?
- From: Brian Christmas <email@hidden>
- Date: Sat, 2 Sep 2017 15:05:06 +1000
Shane, look, I really, really appreciate your advice, but I cannot for the life
of me see how it changes my situation.
In order to get ‘using terms from’ to work, I have to enter a non-variable
item, such as in my example below. The commented line #using terms from
(application id theApp) shows what I WANT to use, but still doesn’t work.
To get using terms from to work, I’m still restricted to knowing the exact name
of the bundle identifier, which I REALLY absolutely need as a variable.
The possible name are …
GraphicConverter
GraphicConverter 10
GraphicConverter 11 (the next release)
Even other App works with a defined bundle identifier that does not alter
between releases, but Thorsten in his infinite wisdom, has decided to link
bundle indentifiers to version releases from now on. Version releases have
numbers because of App Store release. Why he decided to add the same number to
his bundle identifiers only he knows, but I’ve sent a grumbling email to him
pointing out the problem it causes.
Is there any way around this situation? OR, am I up the proverbial creek
without a paddle?
Regards
Santa
property theItem : ((path to desktop as text) & "Numbers_Chart.jpg")
tell application "Finder" to set theApps to (name of (every item of folder
(path to applications folder))) as list
repeat with theApp2 in theApps
if theApp2 contains "GraphicConverter" then
set theUserApp to application theApp2
exit repeat
end if
end repeat
tell application "System Events"
set theApp to bundle identifier of (info for (path to theUserApp)) as
text
end tell
tell application id theApp to activate
tell application "Finder" to set theProcesses to (name of processes) as list
repeat with theApp2 in theProcesses
if theApp2 contains "GraphicConverter" then
set theUserProcess to theApp2 as text
exit repeat
end if
end repeat
using terms from application "GraphicConverter 10"
# if I use the line below instead, Script Editor alters it to the same
as the line above
# using terms from (application id
"com.lemkesoft.graphicconverter10”) — SEE, he damnwell alters the bundle
identifier between releases!!!
#using terms from (application id theApp) -- Fails
tell (application id theApp)
activate
silentopen file (my theItem) — NOW WORKS!!
#open file (my theItem)
tell window 1
try
set TheRes to resolution
set resolutionChangeFlag to false
if item 1 of TheRes < 600 then
set item 1 of TheRes to 600
set resolutionChangeFlag to true
end if
if item 2 of TheRes < 600 then
set item 2 of TheRes to 600
set resolutionChangeFlag to true
end if
if resolutionChangeFlag then change resolution
to TheRes with resample — NOW WORKS!!
end try
end tell
end tell
end using terms from
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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