<?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>DMDirc Development Blog &#187; Actions</title>
	<atom:link href="http://blog.dmdirc.com/category/actions/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dmdirc.com</link>
	<description>DMDirc Development Blog</description>
	<lastBuildDate>Wed, 24 Mar 2010 07:53:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>New Action UIs</title>
		<link>http://blog.dmdirc.com/2008/09/07/new-action-uis/</link>
		<comments>http://blog.dmdirc.com/2008/09/07/new-action-uis/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 21:57:32 +0000</pubDate>
		<dc:creator>greboid</dc:creator>
				<category><![CDATA[Actions]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://blog.dmdirc.com/?p=109</guid>
		<description><![CDATA[In DMDirc 0.6, we have made some back-end improvements to the functionality actions groups which allow authors of action packs to specify meta-data such as a description of the pack, and also list the settings available. We obviously wanted to include this new information into the actions UI, and we were aware that the current [...]]]></description>
			<content:encoded><![CDATA[<p>In DMDirc 0.6, we have made some back-end improvements to the functionality actions groups which allow authors of action packs to specify meta-data such as a description of the pack, and also list the settings available. We obviously wanted to include this new information into the actions UI, and we were aware that the <a href="http://blog.dmdirc.com/2007/05/25/actions-now-with-added-ui/">current actions editor</a> wasn&#8217;t as user-friendly as it could be, so we took the opportunity to redesign and rewrite the actions UIs.</p>
<p><a href="http://blog.dmdirc.com/wp-content/uploads/2008/08/dmdirc-new-actionsmanager.png"><img src="http://blog.dmdirc.com/wp-content/uploads/2008/08/dmdirc-new-actionsmanager-300x256.png" alt="" title="New actions manager UI" width="225" height="192" class="alignleft size-medium wp-image-128" /></a>As you can see from the screenshot we now show an info blurb, version and author for all action groups that provide them. In the future, we plan to allow users to edit action groups&#8217; meta-data from inside the UI. This will make it a lot easier for end users to create action packs and make them available to a wider audience through our <a href="http://addons.dmdirc.com/">addons site</a>, but for the moment only the name of the group is editable. </p>
<p>Settings for a particular group are now displayed underneath the group and are editable using the same components as the preferences dialog. Exposing these to the end user has added a lot more flexibility to actions and should enable them to be used in much nicer ways.</p>
<p>Finally, in the previous incarnation &#8216;wrapped&#8217; actions groups (such as profiles and aliases) were visible but appeared empty. This was rather odd behaviour, so we remedied this and now show the contents of all groups. This allows users to edit the automatically created actions, so they can see how they work or use more advanced features that the wrapper UI doesn&#8217;t expose.  The new UI is also a lot more pleasing to the eye.</p>
<p><a href="http://blog.dmdirc.com/wp-content/uploads/2008/09/aed.png"><img src="http://blog.dmdirc.com/wp-content/uploads/2008/09/aed-300x223.png" alt="" title="DMDirc 0.6 Actions Editor" width="225" height="167" class="alignleft size-medium wp-image-163" /></a>Of course, the Actions Manager is only half of the actions UI; the Actions Editor has also undergone a revamp in 0.6. In DMDirc 0.5.5, we introduced <a href="http://blog.dmdirc.com/2007/10/25/condition-trees-aka-making-actions-even-more-incomprehensible/">Condition trees</a>, but at the time they were only usable if you manually edited the action&#8217;s file in your profile, something which we don&#8217;t expect normal users to do. The new Actions Editor UI exposes condition trees and allows for easy selection of &#8216;AND&#8217; and &#8216;OR&#8217; trees, which should bring the added power of condition trees to more users.</p>
<p>As with the Actions Manager, we think the new Action Editor is much more user friendly than its previous version. You can, for instance, now see all the information about the action on one screen and edit them easily without having to switch between tabs. Of course, we&#8217;re always willing to improve further, so if you have any suggestions, please leave a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dmdirc.com/2008/09/07/new-action-uis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Condition Trees (aka: making actions even more incomprehensible)</title>
		<link>http://blog.dmdirc.com/2007/10/25/condition-trees-aka-making-actions-even-more-incomprehensible/</link>
		<comments>http://blog.dmdirc.com/2007/10/25/condition-trees-aka-making-actions-even-more-incomprehensible/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 02:37:36 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Actions]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.dmdirc.com/2007/10/25/condition-trees-aka-making-actions-even-more-incomprehensible/</guid>
		<description><![CDATA[I&#8217;ve just committed changes to DMDirc that allow you to make use of what I call &#8220;condition trees&#8221; in actions. These basically allow you to specify how conditions should be evaluated. In DMDirc 0.5.1 (and earlier), all action conditions had to be true in order for the action to be executed. Condition trees allow you [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just committed changes to DMDirc that allow you to make use of what I call &#8220;condition trees&#8221; in actions. These basically allow you to specify how conditions should be evaluated. In DMDirc 0.5.1 (and earlier), all action conditions had to be true in order for the action to be executed. Condition trees allow you to use any combination of AND, OR, NOT and brackets to alter this behaviour.</p>
<p>An example condition tree looks like this: <code>(0&#038;(1|2)&#038;!(1&#038;2))</code>. The numbers refer to the outcome of the conditions (in this case my action has three conditions, which get numbered 0, 1 and 2), and &#038;, |, ! and the brackets have their expected meanings. If you&#8217;re not too fluent in boolean logic, the condition tree translates roughly as &#8220;condition 0 is true, and exactly one of conditions 1 and 2 are true&#8221;, or &#8220;condition 0 and (condition 1 XOR condition 2)&#8221; if you want.</p>
<p>At a basic level, condition trees allow you to reduce the number of actions you have (for example: if you want to do something whenever someone mentions your nickname OR when someone starts a message with &#8220;!hello&#8221;, in DMDirc 0.5.1 and below you need two actions with duplicate trigger/response/format settings; in DMDirc 0.6 you will only need one action with a condition tree set). Beyond that, condition trees allow a much closer approximation to &#8216;if&#8217; statements in scripting languages, thus enabling extremely complex conditionals without the overhead of a scripting language or the learning curve of one.</p>
<p><span id="more-42"></span></p>
<p>To pre-emptively answer a few questions:</p>
<ul>
<li>Condition Trees are called Trees because of their implementation, rather than their function. Each ConditionTree object has exactly one operation (and, or, not, noop [used for empty brackets and trees] or var [used to look up the result of a condition]), and zero (in the case of noop or var), one (in the case of not) or two (in the case of and and or) child condition trees.
<li>The title of this blog post is a reference to a question another developer asked when I was talking about condition trees &#8211; it went something like &#8220;are you *trying* to make the actions system more incomprehensible?!&#8221;; my reply: &#8220;no, I&#8217;m trying to make it more powerful; incomprehensibility is just a side-effect&#8221;.
<li>We will be having a UI for condition trees in 0.6, but we&#8217;re not entirely sure of the details yet. Stay tuned for details later in the development cycle.
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.dmdirc.com/2007/10/25/condition-trees-aka-making-actions-even-more-incomprehensible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Actions UI improvements, part 2</title>
		<link>http://blog.dmdirc.com/2007/09/25/actions-ui-improvements-part-2/</link>
		<comments>http://blog.dmdirc.com/2007/09/25/actions-ui-improvements-part-2/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 13:38:42 +0000</pubDate>
		<dc:creator>greboid</dc:creator>
				<category><![CDATA[Actions]]></category>

		<guid isPermaLink="false">http://blog.dmdirc.com/2007/09/25/actions-ui-improvements-part-2/</guid>
		<description><![CDATA[Further to the changes to the actions UI previously mentioned, there are now several more enhancements: one exposing substitutions and two UIs wrapping around actions simplifying common tasks &#8212; aliases and performs. Substitutions In 0.4 actions substitutions were somewhat of a black art, whilst they were quite powerful, they were nearly impossible to figure out, [...]]]></description>
			<content:encoded><![CDATA[<p>Further to the changes to the actions UI <a href="http://blog.dmdirc.com/2007/09/02/actions-ui-improvements-part-1/">previously mentioned</a>, there are now several more enhancements: one exposing substitutions and two UIs wrapping around actions simplifying common tasks &mdash; aliases and performs.</p>
<p><span id="more-33"></span></p>
<p><strong>Substitutions</strong><br />
In 0.4 actions substitutions were somewhat of a black art, whilst they were quite powerful, they were nearly impossible to figure out, so we have added a UI component to both the actions response panel and condition editor making them much more accessible.  When editing either of these you will be able to access a full list of available substitutions, which can be added at the current cursor position either by double clicking or using the button, or added any any position you like by dragging and dropping them.</p>
<p><center><br />
<a href='http://blog.dmdirc.com/wp-content/uploads/2007/09/substitutions1.png' title='Response panel with substitutions list'><img src='http://blog.dmdirc.com/wp-content/uploads/2007/09/substitutions1.png' alt='Response panel with substitutions list' /></a></center></p>
<p><center><a href='http://blog.dmdirc.com/wp-content/uploads/2007/09/substitutions2.png' title='Condition editor with substitutions button'><img src='http://blog.dmdirc.com/wp-content/uploads/2007/09/substitutions2.png' alt='Condition editor with substitutions button' /></a>    <a href='http://blog.dmdirc.com/wp-content/uploads/2007/09/substitutions3.png' title='Condition editor with substitutions list'><img src='http://blog.dmdirc.com/wp-content/uploads/2007/09/substitutions3.png' alt='Condition editor with substitutions list' /></a><br />
</center></p>
<p><strong>Aliases</strong><br />
<center><br />
<a href='http://blog.dmdirc.com/wp-content/uploads/2007/09/aliasmanager.png' title='Alias manager'><img src='http://blog.dmdirc.com/wp-content/uploads/2007/09/aliasmanager.png' alt='Alias manager' /></a><br />
</center><br />
The alias manager can be found in the settings menu. Once opened aliases can be created for any unknown command (built in commands always take precedence), they can be specified to match a command with any amount of parameters, or a specific number or parameters.</p>
<p><strong>Perform</strong><br />
<center><br />
<a href='http://blog.dmdirc.com/wp-content/uploads/2007/09/perform.png' title='Perform panel'><img src='http://blog.dmdirc.com/wp-content/uploads/2007/09/perform.png' alt='Perform panel' /></a><br />
</center><br />
To create a new perform you must be connected to the server you wish to create a perform for, switch to the server window and go to settings, then select the perform tab.  Performs can be added to the current server or network and greatly simplify creating performs.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dmdirc.com/2007/09/25/actions-ui-improvements-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Actions UI improvements, part 1</title>
		<link>http://blog.dmdirc.com/2007/09/02/actions-ui-improvements-part-1/</link>
		<comments>http://blog.dmdirc.com/2007/09/02/actions-ui-improvements-part-1/#comments</comments>
		<pubDate>Sun, 02 Sep 2007 14:33:34 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Actions]]></category>

		<guid isPermaLink="false">http://blog.dmdirc.com/2007/09/02/actions-ui-improvements-part-1/</guid>
		<description><![CDATA[One of the best things about DMDirc is, in my opinion, its robust actions system. Actions allow you to do virtually anything you can do in a far more complex scripting language, with the benefit of being fairly easy to hide behind a nice user interface. Unfortunately, with something as flexible as actions, it&#8217;s hard [...]]]></description>
			<content:encoded><![CDATA[<p>One of the best things about DMDirc is, in my opinion, its robust <a href="http://blog.dmdirc.com/2007/05/11/introducing-actions/">actions system</a>. Actions allow you to do virtually anything you can do in a far more complex scripting language, with the benefit of being fairly easy to hide behind a <a href="http://blog.dmdirc.com/2007/05/25/actions-now-with-added-ui/">nice user interface</a>.</p>
<p>Unfortunately, with something as flexible as actions, it&#8217;s hard to get the UI right the first time around. For DMDirc 0.5 we&#8217;re introducing a few minor changes which will hopefully make creating and editing actions easier.</p>
<p>The first of our two tweaks is a change in the behaviour of the actions manager. In DMDirc 0.4, to edit an action you need to click the group tab (if it&#8217;s not selected), move your mouse down to the action, click on it, and then mouse all the way over to the edit button (taking care not to hit any of the six other buttons that line the bottom of the manager). In DMDirc 0.5, you can simply double click on an action to open it in the editor.</p>
<p>The second tweak is a change to the &#8220;Trigger&#8221; drop down menu in the actions editor. In DMDirc 0.4, this is a long list that only has a vague sense of order (in fact, the order of items in the list is the order we defined them in code, which is generally based more on when they were added, rather than what they&#8217;re for). In DMDirc 0.5, the triggers list is split into distinct groups, and the triggers within a group are sorted alphabetically, making it much easier to find what you&#8217;re looking for. Before and after pictures are below, although they don&#8217;t do the changes much justice, thanks to the rather limited size of the dropdown menu.</p>
<p><img src='http://blog.dmdirc.com/wp-content/uploads/2007/09/triggers-before.png' alt='triggers-before.png' /><br />
<img src='http://blog.dmdirc.com/wp-content/uploads/2007/09/triggers-after.png' alt='triggers-after.png' /></p>
<p>We have several more improvements planned for the actions UI before 0.5 is released, and we also have some brand new UI to make using certain types of actions even easier, which we&#8217;ll be blogging about later.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dmdirc.com/2007/09/02/actions-ui-improvements-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Actions: now with added UI</title>
		<link>http://blog.dmdirc.com/2007/05/25/actions-now-with-added-ui/</link>
		<comments>http://blog.dmdirc.com/2007/05/25/actions-now-with-added-ui/#comments</comments>
		<pubDate>Fri, 25 May 2007 18:03:28 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Actions]]></category>

		<guid isPermaLink="false">http://blog.dmdirc.com/2007/05/25/actions-now-with-added-ui/</guid>
		<description><![CDATA[Following on from my previous post, the front-end for actions is just about complete. Here are some preview images: The actions manager lists all known actions, sorted into groups (which correspond to directories on the disk). The &#8220;general&#8221; tab of the actions editor allows you to select which triggers the action responds to, as well [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from my previous post, the front-end for actions is just about complete. Here are some preview images:</p>
<p><img src='http://blog.dmdirc.com/wp-content/uploads/2007/05/dmdirc-actions1.png' alt='Actions Manager dialog' /><br />
The actions manager lists all known actions, sorted into groups (which correspond to directories on the disk).</p>
<p><img src='http://blog.dmdirc.com/wp-content/uploads/2007/05/dmdirc-actions2.png' alt='Editing an action: tab 1' /><br />
The &#8220;general&#8221; tab of the actions editor allows you to select which triggers the action responds to, as well as specifying its friendly name.</p>
<p><img src='http://blog.dmdirc.com/wp-content/uploads/2007/05/dmdirc-actions-conditions1.png' alt='Editing an action: tab 2' /><br />
The &#8220;conditions&#8221; tab allows you to specify conditions for the action. The pencil icon brings up the condition editor for that condition (see next image), while the cross button deletes the corresponding condition.</p>
<p><img src='http://blog.dmdirc.com/wp-content/uploads/2007/05/dmdirc-actions-conditions2.png' alt='Editing an action: conditions' /><br />
The conditions editor allows you to add or modify an action condition. Once you select an argument, the components list is updated to contain only the applicable components, and when you select a component the comparison list is updated similarly.</p>
<p><img src='http://blog.dmdirc.com/wp-content/uploads/2007/05/dmdirc-actions3.png' alt='Editing an action: tab 3' /><br />
Finally, the response tab allows you to specify how the client should respond if this action is triggered. The commands are executed as though you typed them in the window that triggered the event.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dmdirc.com/2007/05/25/actions-now-with-added-ui/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Introducing actions</title>
		<link>http://blog.dmdirc.com/2007/05/11/introducing-actions/</link>
		<comments>http://blog.dmdirc.com/2007/05/11/introducing-actions/#comments</comments>
		<pubDate>Fri, 11 May 2007 15:55:53 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Actions]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.dmdirc.com/2007/05/11/introducing-actions/</guid>
		<description><![CDATA[&#8216;Actions&#8217; are one of the major features we&#8217;ve introduced since DMDirc 0.3 was released. Actions provide a way for the user to make the client respond to events in certain ways, and basically provide a subset of the functionality of scripting in other clients (e.g. mIRC), but in a much more user-friendly manner. The graphical [...]]]></description>
			<content:encoded><![CDATA[<p>&#8216;Actions&#8217; are one of the major features we&#8217;ve introduced since DMDirc 0.3 was released.  Actions provide a way for the user to make the client respond to events in certain ways, and basically provide a subset of the functionality of scripting in other clients (e.g. mIRC), but in a <strong>much</strong> more user-friendly manner.</p>
<p>The graphical front-end for actions is still under construction, but the back end has been fully functional for a week or so. Here&#8217;s an example of one of the actions I use:</p>
<pre>
trigger=CHANNEL_USERAWAY
conditions=0
response=/setnickcolour $source 14
</pre>
<p>This rather brief action makes the client colour anyone who is set away to a light grey colour.  (Aside: DMDirc can now be configured to send /who requests at a certain interval (60 seconds, by default).  This functionality can also be enabled and disabled per channel; if it&#8217;s disabled then the CHANNEL_USERAWAY events won&#8217;t be triggered unless the user manually sends a who request).  The &#8216;trigger&#8217; field specifies which event triggers the action (and may, as we&#8217;ll see in a minute, contain more than one event);  the &#8216;conditions&#8217; field tells DMDirc how many conditions there are for the execution of the action &#8211; in this case, none; finally the &#8216;response&#8217; field contains commands to be executed (or text to be sent to the channel) &#8211; here it uses a recently-introduced command to set the colour of a specified nickname.  The &#8220;$source&#8221; part will be explained shortly.</p>
<p>Here&#8217;s a slightly more complex action:</p>
<pre>
trigger=CHANNEL_MESSAGE|CHANNEL_ACTION
conditions=1

condition0-arg=2
condition0-component=STRING_STRING
condition0-comparison=STRING_CONTAINS
condition0-target=$nick

response=/notify $highlightcolour\\n/popup Highlight on $chan: <$source> $message
format=channelHighlight
</pre>
<p>Here we have two triggers: CHANNEL_MESSAGE and CHANNEL_ACTION.  If multiple triggers are specified, they have to be type-compatible (they must have the same number of potential arguments, which must be of the same classes) &#8211; this restriction, like any others mentioned hereafter, will be transparently enforced by the graphical editor, so there will be no need for users to worry about this.</p>
<p>Unlike the previous example, this one also specifies a condition.  There are four parts to a condition: the argument, component, comparison and target.  The first two determine what the user wants to test &#8211; the argument identifies which object they&#8217;re interested in (e.g. a Channel or User), and the component determines which aspect of that they want to test (A channel&#8217;s name, a user&#8217;s modes, etc).  The comparison, rather unsurprisingly, determines what comparison should be used to compare between the test subject and the user&#8217;s target.  Some comparisons for strings, for example, are &#8220;starts with&#8221;, &#8220;contains&#8221; and &#8220;equals&#8221;.  The target, as implied, is the data that the subject is compared to. An action can have any number of conditions, and will only be executed if all of them pass.</p>
<p>In this example you&#8217;ll also notice that the &#8216;response&#8217; field contains two commands (both new since 0.3), which are both executed.  It also contains a few variables.  These are dynamically replaced when the action is being tested and executed (they can appear both in the response and the targets of any conditions).  The exact replacements available depend upon the arguments &#8211; $source will be set to the user&#8217;s nickname if the action was triggered by someone, and $chan will be set to the channel name if the action is channel-based, for example.  Others are always present (such as $nick, used in the condition, which equals your current nickname on the server that the action is being executed for).  The actions system will also replace any variable with the same name as a config setting under the &#8220;actions&#8221; domain &#8211; in the example above, the $highlightcolour variable is replaced by the value of my &#8216;actions.highlightcolour&#8217; setting.</p>
<p>Finally, we have the &#8216;formatter&#8217; field. This allows the user to control the default output that is normally associated with an action.  In this example, it changes the formatter name from &#8216;channelMessage&#8217; (the default), to &#8216;channelHighlight&#8217;, which is a new format I&#8217;ve written which makes the line show up red.  You can use this to stop default messages entirely (by setting the formatter to an empty string), or, for example, to display a custom message if a certain event happens.</p>
<p>You can try out actions in the latest nightly builds.  There is a pack of actions available <a href="http://dmdirc.googlecode.com/files/chancolours.zip">here</a> that provide some basic functionality for changing the colour of channels in the treeview (joins/parts/quit make the channels turn green, messages make them turn blue, and highlights turn them red).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dmdirc.com/2007/05/11/introducing-actions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
