<?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>devtrends.com &#187; display dialog</title>
	<atom:link href="http://www.devtrends.com/index.php/tag/display-dialog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devtrends.com</link>
	<description>developing trends in information technology</description>
	<lastBuildDate>Tue, 06 Sep 2011 19:27:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Alert (Display Dialog) in AppleScript</title>
		<link>http://www.devtrends.com/index.php/alert-display-dialog-in-applescript/</link>
		<comments>http://www.devtrends.com/index.php/alert-display-dialog-in-applescript/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 04:40:12 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[display dialog]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=510</guid>
		<description><![CDATA[To display an alert or dialog prompt in AppleScript is easy, once you know the command string to use. For simple scripting, such as AppleScript or VBScript, I will frequently...]]></description>
			<content:encoded><![CDATA[<p>To display an alert or dialog prompt in AppleScript is easy, once you know the command string to use. For simple scripting, such as AppleScript or VBScript, I will frequently use alert dialogs to display the contents of variables. Hmm, any other reasons for a dialog prompt? Obviously, the true intent is to provide some type of user interface/input&#8230;</p>
<pre style="padding-left: 30px;">display dialog the [string variable]
  buttons {"Yes", "No"}
  default button 1
  with icon 1
  giving up after [(x) seconds]</pre>
<p>To customize this, replace [string variable] with a string in quotes or a string variable name. The buttons array will let you define the text of each button, if you wanted only an &#8220;Ok&#8221; use {&#8220;Ok&#8221;}. The default button 1 defines which button is automatically selected. Giving up after (x) seconds will close the dialog automatically if the user does not respond.</p>
<pre style="padding-left: 30px;">set my_variable to text returned of (display dialog the [string variable]
  buttons {"Yes", "No"}
  default button 1
  with icon 1)</pre>
<p>The above example allows you to use a &#8220;display dialog&#8221; as a user prompt, requiring some type of input that the remaining AppleScript can then process through logic, if, select, et cetera.</p>
<p>As you might have imagined, there are more options available for &#8220;display dialog&#8221;, including user input (text and multiple buttons). If you want more information on the &#8220;display dialog&#8221; method, check out this article on <a href="http://en.wikibooks.org/wiki/AppleScript_Programming/Advanced_Code_List/Display_Dialog" target="_blank">wikibooks</a>.</p>
<p>-Aaron Gilbert</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/alert-display-dialog-in-applescript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

