Problem with the name 'GraphicConverter 9'

This area contains the messages from the old Yahoo gcmac group after the port.
Post Reply
Brian Christmas
Posts: 0
Joined: Thu Nov 18, 2010 10:02 pm

Problem with the name 'GraphicConverter 9'

Post by Brian Christmas »

G’day from Oz, GC users.I have a very large graphics-in-emails-processing Xcode project, that  used to use the generic term ‘GraphicConverter’ to activate GC, but this became disrupted with the new version of GC being called ‘GraphicConverter 9’.This new naming convention means that for every new release of an updated GC, I’d have to re-write and release a new version of my App.However, I tried automatically renaming the version of GC, and it works, so here’s the code for posterity…RegardsSanta-- Created 2014-10-27 07:55:57 +1100 by Brian Christmas-- © 2014 Brian Christmas, MeSelfSoftwareuse AppleScript version "2.4"use scripting additionsuse framework "Foundation"-- use framework “AppKit"set existsQuarkFlag to falseset existsAcrobatFlag to falseset existsIllustratorFlag to falseset existsInDesignFlag to falseset existsGraphicConverterFlag to falseset existsWordFlag to falseset existsExcelFlag to falsetell application "Finder" set appNames to name of every application file in entire contents of folder "Applications" of startup disk as listend tellrepeat with eachApp in appNames if "QuarkXPress" is in (eachApp as text) then set existsQuarkFlag to true if "Adobe Acrobat Pro" is in (eachApp as text) then set existsAcrobatFlag to true if "Adobe Illustrator" is in (eachApp as text) then set existsIllustratorFlag to true if "Adobe InDesign" is in (eachApp as text) then set existsInDesignFlag to true if "GraphicConverter" is in (eachApp as text) then set existsGraphicConverterFlag to true if (eachApp as text) is not "GraphicConverter" then tell application "Finder" to set the name of application file ((path to applications folder as text) & eachApp as text) to "GraphicConverter.app" end if if "Microsoft Word" is in (eachApp as text) then set existsWordFlag to true if "Microsoft Excel" is in (eachApp as text) then set existsExcelFlag to trueend repeatappNames & return & return & existsQuarkFlag & return & existsAcrobatFlag & return & existsIllustratorFlag & return & existsInDesignFlag & return & existsGraphicConverterFlag & return & existsWordFlag & return & existsExcelFlag & return
Wessel Jan
Posts: 0
Joined: Sun Nov 09, 2008 7:00 pm

Re: Problem with the name 'GraphicConverter 9'

Post by Wessel Jan »

Thx for the code snippet Jan
Post Reply