<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Inside Scoop - Creative News &#38; Views &#187; automation</title>
	<atom:link href="http://blog.insidersoftware.com/archives/tag/automation/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.insidersoftware.com</link>
	<description>Insider Software Blog</description>
	<lastBuildDate>Thu, 22 Dec 2011 20:16:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Launching Smasher from FontAgent Pro</title>
		<link>http://blog.insidersoftware.com/archives/54</link>
		<comments>http://blog.insidersoftware.com/archives/54#comments</comments>
		<pubDate>Mon, 18 Apr 2011 14:56:38 +0000</pubDate>
		<dc:creator>sstoel</dc:creator>
				<category><![CDATA[automation]]></category>
		<category><![CDATA[Smasher]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[FontAgent Pro]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://blog.insidersoftware.com/?p=54</guid>
		<description><![CDATA[One of the great, unique features of FontAgent Pro for Macintosh is its ability to automate font management tasks using AppleScript. On the right side of the FontAgent Pro menubar is a script icon that lists scripts that ship with FontAgent Pro as well as those you add yourself. The scripts that come with FontAgent [...]]]></description>
			<content:encoded><![CDATA[<p>One of the great, unique features of <a href="http://www.insidersoftware.com/FA_pro_osx.php" target="_self">FontAgent Pro</a> for Macintosh is its ability to automate font management tasks using <a href="http://www.macosxautomation.com/applescript/" target="_blank">AppleScript</a>. On the right side of the FontAgent Pro menubar is a script icon that lists scripts that ship with FontAgent Pro as well as those you add yourself.</p>
<p><a href="http://blog.insidersoftware.com/wp-content/uploads/2009/10/FontAgent-ProScreenSnapz006.jpg"><img class="size-full wp-image-55 aligncenter" title="FontAgent ProScreenSnapz006" src="http://blog.insidersoftware.com/wp-content/uploads/2009/10/FontAgent-ProScreenSnapz006.jpg" alt="FontAgent ProScreenSnapz006" width="361" height="216" /></a>The scripts that come with FontAgent Pro work directly with FontAgent Pro, but you can add scripts that run other applications as well.</p>
<p>Below is a script that launches <a href="http://www.insidersoftware.com/SM.php" target="_self">Smasher</a>, Insider&#8217;s font and cache maintenance utility. If you would like to download the script click <a href="http://blog.insidersoftware.com/wp-content/uploads/2009/10/Launch-Smasher.zip" target="_self">here</a>. Unzip the attached file and place the script in the <em>/Library/Application Support/FontAgent Pro/Scripts/</em> folder to get it to appear as <em>Launch Smasher</em> in the FontAgent Pro &gt; Scripts menu.</p>
<p><span style="color: #0000ff;">set</span> <span style="color: #008000;">appFolder </span><span style="color: #0000ff;">to</span> <span style="color: #0000ff;">(path to applications folder as Unicode text)</span><br />
<span style="color: #0000ff;">set</span> <span style="color: #008000;">afolder </span><span style="color: #0000ff;">to</span> <span style="color: #008000;">appFolder</span> &amp; &#8220;Smasher&#8221;<br />
<span style="color: #0000ff;">tell application</span> &#8220;Finder&#8221;<br />
<span style="color: #0000ff;">if exists folder</span> <span style="color: #339966;">afolder</span> <span style="color: #0000ff;">then</span><br />
<span style="color: #0000ff;">try<br />
tell application</span> &#8220;Smasher&#8221;<br />
<span style="color: #0000ff;">activate<br />
end tell<br />
end try<br />
else<br />
tell application</span> &#8220;Finder&#8221;<br />
<span style="color: #0000ff;">activate</span><br />
<span style="color: #0000ff;">display dialog</span> &#8220;You do not have Smasher installed. To learn more about Smasher and download a demo click \&#8221;Learn More.\&#8221;" <span style="color: #0000ff;">buttons <span style="color: #000000;">{</span></span>&#8220;<span style="color: #0000ff;"><span style="color: #000000;">Cancel</span></span>&#8220;<span style="color: #0000ff;"><span style="color: #000000;">, </span></span>&#8220;<span style="color: #0000ff;"><span style="color: #000000;">Learn More</span></span>&#8220;<span style="color: #0000ff;"><span style="color: #000000;">}</span> default button 2</span><br />
<span style="color: #0000ff;">if the button returned of the result is</span> &#8220;Learn More&#8221; then<br />
<span style="color: #0000ff;">set </span><span style="color: #339966;">theURL</span> <span style="color: #0000ff;">to</span> &#8220;open http://www.insidersoftware.com/SM.php&#8221;<br />
<span style="color: #0000ff;">do shell script</span> <span style="color: #339966;">theURL</span><br />
<span style="color: #0000ff;">else</span><br />
<span style="color: #666699;">&#8211; nothing happens</span><br />
<span style="color: #0000ff;">end if<br />
end tell<br />
end if<br />
end tell</span></p>
<p><span style="color: #0000ff;"><span style="color: #000000;">Note:  If you copy and paste the text into Script Editor, depending on the browser you are using, you may need to do a find-and-replace on the quotes to get them to be <em>dumb quotes</em>. ScriptEditor will see a <em>smart quote</em> as an unknown token and the script will not compile. You can view and edit the linked script after you download it if you wish.</span></span></p>
<p><span style="color: #0000ff;"><span style="color: #000000;">This script is handy because when you start seeing <a href="http://www.fontgeek.net/blog/?p=6" target="_blank">symptoms of font cache corruption</a>, it allows you to quickly launch Smasher from FontAgent Pro, where you can clear your caches and get back to your work. It is also a good idea to make sure you have Smasher&#8217;s cache clearing scheduled to run each time you start or shutdown your Mac.<br />
</span></span></p>
<p><span style="color: #0000ff;"><span style="color: #000000;">When you run the script, Smasher launches and you can edit settings to clear your caches in any manner you wish. If you don&#8217;t have Smasher installed it  gives you an option to go to a web page where you can learn more about the product.<br />
</span></span></p>
<p style="text-align: left;"><a href="http://blog.insidersoftware.com/wp-content/uploads/2010/09/ScheduleSmasher2.png"><img class="size-full wp-image-874 aligncenter" title="ScheduleSmasher2" src="http://blog.insidersoftware.com/wp-content/uploads/2010/09/ScheduleSmasher2.png" alt="" width="451" height="341" /></a><span style="color: #0000ff;"><span style="color: #000000;"><a href="http://blog.insidersoftware.com/wp-content/uploads/2009/10/SmasherPrefsSelected.jpg"><br />
</a></span></span>This script is offered as is and you may feel free to edit it in any way you wish. For example, <span style="color: #0000ff;"><span style="color: #000000;">you add scripts that launch other applications such as QuarkXPress or InDesign from within FontAgent Pro.<br />
</span></span></p>
<p style="text-align: left;"><span style="color: #0000ff;"><span style="color: #000000;">In future posts, we will talk more about using AppleScript to automate font-related workflows. Stay tuned to <em>The Inside Scoop</em>.</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.insidersoftware.com/archives/54/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automating Font Workflow with AppleScript</title>
		<link>http://blog.insidersoftware.com/archives/18</link>
		<comments>http://blog.insidersoftware.com/archives/18#comments</comments>
		<pubDate>Mon, 07 Dec 2009 08:01:54 +0000</pubDate>
		<dc:creator>sstoel</dc:creator>
				<category><![CDATA[automation]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[FontAgent Pro]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://blog.insidersoftware.com/?p=18</guid>
		<description><![CDATA[Automating project workflow is crucial to today&#8217;s prepress and design workplaces. FontAgent Pro is perfect for these applications because you can use AppleScript to automate virtually all of its functionality. AppleScript is an English-like language you can use to write scripts that automate the actions of your Mac and the applications that run on it. [...]]]></description>
			<content:encoded><![CDATA[<p>Automating project workflow is crucial to today&#8217;s prepress and design workplaces.  FontAgent Pro is perfect for these applications because you can use AppleScript to automate virtually all of its functionality.</p>
<p>AppleScript is an English-like language you can use to write scripts that automate the actions of your Mac and the applications that run on it. When you want your Mac applications to work together in harmony, AppleScript becomes the lingua franca that makes them all talk to each other. Using it, you and your applications become a lot more productive.</p>
<p><img class="alignright" title="fapicon" src="http://www.fontgeek.net/blog/wp-content/uploads/2009/04/fapicon.jpg" alt="fapicon" width="164" height="144" /></p>
<p>If your project workflow uses fonts, FontAgent Pro is the font management tool you need to automate your workflow. While old versions of Suitcase supported AppleScript, the current versions of Extensis Suitcase Fusion 2 and Extensis Universal Type Server (UTS) client do not, nor does FontExplorer X.</p>
<p><strong>How you can use AppleScript<br />
</strong></p>
<p>There are lots of things you can automate with FontAgent Pro scripts. One of the most useful scripts imports and activates fonts when you drag a folder of fonts onto an AppleScript application.</p>
<p>Here is an example of how this might be useful:</p>
<p>It is common for prepress service providers to receive many different jobs from different clients during the day. Service providers usually receive fonts in a <em>Package</em> or in a folder created by a <em>Collect for Output</em> command. These fonts need to be imported into FontAgent Pro and activated to open the application file in the project.</p>
<p>Using AppleScript and FontAgent Pro, you can create a droplet application where you can drag the folder of files provided by a client (which in this example is named by job number) and the fonts contained will be automatically imported into a unique library with the same name as the folder. The script also deactivates all other fonts, and then activates the library you just imported so you can be sure you are using the exact fonts provided by the client. Without doing this, you cannot be sure that the job will rip and print as expected. After running this script, you are ready to launch whatever application your client used to create the application file and proceed.</p>
<p><img class="alignright" title="fapdragactivatorimg" src="http://www.fontgeek.net/blog/wp-content/uploads/2009/04/fapdragactivatorimg.jpg" alt="fapdragactivatorimg" width="164" height="144" /></p>
<p>If you just want to get the script and start rolling, you can download it <a title="FontAgent Pro Drag Activator Script" href="http://blog.insidersoftware.com/wp-content/uploads/2009/09/FAPDragActivator.zip">here</a> and unzip it on your desktop and you are good to go.</p>
<p>The script is provided as is, but if you have any questions or suggestions, you can contact us at <a href="http://www.insidersoftware.com/SU_support.php" target="_blank">Insider Technical Support</a>.</p>
<p><strong>The script</strong></p>
<p>The text for the script is below:</p>
<div class="codesnip-container" >
<div class="applescript codesnip" style="font-family:monospace;"><span class="kw3">on</span> <span class="kw1">open</span> these_items<br />
<span class="kw3">set</span> afolder <span class="kw3">to</span> these_items<br />
<span class="kw3">set</span> <span class="br0">&#123;</span><span class="kw1">name</span>:folderName<span class="br0">&#125;</span> <span class="kw3">to</span> <span class="kw1">info for</span> afolder<br />
<span class="kw3">try</span><br />
<span class="kw3">tell</span> <span class="kw1">application</span> <span class="st0">&quot;FontAgent Pro&quot;</span><br />
<span class="kw3">set</span> DB <span class="kw3">to</span> default database<br />
<span class="kw3">tell</span> DB<br />
<span class="co1">&#8211; this section deactivates all fonts in FAP</span><br />
<span class="kw3">set</span> LibList <span class="kw3">to</span> <span class="kw2">every</span> library<br />
deactivate fonts LibList<br />
<span class="co1">&#8211; get the path to where libraries are kept and returned a as a POSIX path</span><br />
<span class="kw3">set</span> LibFolder <span class="kw3">to</span> library path <span class="kw3">of</span> <span class="kw2">first</span> library <span class="kw2">as</span> <span class="kw1">POSIX file</span><br />
<span class="co1">&#8211; build path to new libary</span><br />
<span class="kw3">tell</span> <span class="kw1">application</span> <span class="st0">&quot;Finder&quot;</span> <span class="kw3">to</span> <span class="kw3">set</span> libpath <span class="kw3">to</span> <span class="kw1">POSIX path</span> <span class="kw3">of</span> <span class="br0">&#40;</span>container <span class="kw3">of</span> <span class="kw1">folder</span> LibFolder <span class="kw2">as</span> <span class="kw1">string</span><span class="br0">&#41;</span> <span class="sy0">&amp;</span>amp; folderName<br />
<span class="kw3">end</span> <span class="kw3">tell</span><br />
<span class="kw3">set</span> NL <span class="kw3">to</span> <span class="kw1">new</span> library <span class="kw3">in</span> DB <span class="kw3">with</span> <span class="kw1">properties</span> <span class="br0">&#123;</span>library <span class="kw1">name</span>:folderName, library path:libpath<span class="br0">&#125;</span><br />
import fonts afolder options <span class="br0">&#123;</span>destination library:NL, <span class="kw1">activate</span> <span class="kw2">after</span> importing:<span class="kw1">true</span><span class="br0">&#125;</span><br />
<span class="kw3">end</span> <span class="kw3">tell</span><br />
<span class="kw3">on</span> <span class="kw3">error</span> <span class="kw2">the</span> error_message <span class="kw1">number</span> <span class="kw2">the</span> error_number<br />
<span class="kw1">display dialog</span> <span class="st0">&quot;Error: &quot;</span> <span class="sy0">&amp;</span>amp; <span class="kw2">the</span> error_number <span class="sy0">&amp;</span>amp; <span class="st0">&quot;. &quot;</span> <span class="sy0">&amp;</span>amp; <span class="kw2">the</span> error_message <span class="kw1">buttons</span> <span class="br0">&#123;</span><span class="st0">&quot;OK&quot;</span><span class="br0">&#125;</span> default button 1<br />
<span class="kw3">end</span> <span class="kw3">try</span><br />
<span class="kw3">end</span> <span class="kw1">open</span></div>
</div>
<p><span style="color: #0000ff;"><span style="color: #000000;">If you copy and paste the text into Script Editor, you may get a syntax error when you attempt to compile the script. This is most likely because the quotation marks in the text are <em>smart quotation marks</em> or curly quotes as opposed to the straight <em>dumb quotation marks</em>. Just do a find-and-replace with the dumb quotes and you can edit the script from there, or just download the script from the link provided above.<br />
</span></span></p>
<p><span style="color: #0000ff;"><span style="color: #000000;"><strong>How to use the script</strong><br />
</span></span></p>
<p><span style="color: #0000ff;"><span style="color: #000000;">Simply take a folder of fonts and give it a name. This example uses a folder created from a package-for-output InDesign CS 4 project, and it&#8217;s named with a five-digit project number.<br />
</span></span></p>
<p style="text-align: center;"><span style="color: #0000ff;"><span style="color: #000000;"><img class="aligncenter" title="fontfolder2" src="http://www.fontgeek.net/blog/wp-content/uploads/2009/04/fontfolder2.jpg" alt="fontfolder2" width="164" height="144" /><br />
</span></span></p>
<p><span style="color: #0000ff;"><span style="color: #000000;"> Drag the folder onto the <a title="FAPDragActivator" href="http://www.fontgeek.net/Sample_Assets/FAPDragActivator.zip" target="_self">FAPDragActivator</a> icon on your desktop and let the script do its stuff.</span></span></p>
<p style="text-align: center;"><span style="color: #0000ff;"><span style="color: #000000;"><img class="aligncenter" title="folderscript" src="http://www.fontgeek.net/blog/wp-content/uploads/2009/04/folderscript.jpg" alt="folderscript" width="164" height="181" /></span></span></p>
<p><span style="color: #0000ff;"><span style="color: #000000;">From the screenshot below, you can see that the fonts were imported into FontAgent Pro (in a library named after the folder) and are indicated active with a green activation sphere. Also notice all the other fonts in the collection are deactivated.</span></span></p>
<p style="text-align: center;"><span style="color: #0000ff;"><span style="color: #000000;"><img title="libadded" src="http://www.fontgeek.net/blog/wp-content/uploads/2009/04/libadded.jpg" alt="libadded" width="495" height="369" /></span></span></p>
<p style="text-align: left;"><span style="color: #0000ff;"><span style="color: #000000;">The fun doesn&#8217;t have to stop here. This script can be integrated into a larger script that further automates your workflow. This script could activate the fonts and could hand the document off to InDesign or QuarkXpress to print a soft proof using a preset print setting. </span></span></p>
<p style="text-align: left;"><span style="color: #0000ff;"><span style="color: #000000;">In future posts we will talk more about using AppleScript to automate font-related workflows. Stay tuned to the Insider Blog.<br />
</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.insidersoftware.com/archives/18/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

