<div class="markdown">
<p dir="auto">On 21 Sep 2014, at 9:56, Alexander Kucera wrote:</p>
<blockquote>
<p dir="auto">is it possible to query the user for input when running a bundle?</p>
</blockquote>
<p dir="auto">Yes, you could, for example, use AppleScript for this. The hardest part is finding <a href="https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html#//apple_ref/doc/uid/TP40000983-CH216-SW12">the documentation</a>.</p>
<p dir="auto">Here is a useful one-liner:</p>
<pre><code>osascript -e 'tell app "System Events" to return text returned of (display dialog "Give me some text" default answer "")'
</code></pre>
<blockquote>
<p dir="auto">I am working on a bundle to send stuff to Studiometry and it allows linking to a project ID, which is usually not present in the email, so I thought I'd just input it before exporting to Studiometry (where it is much more tedious to change the linking afterwards).</p>
<p dir="auto">The alternative would be to use tagging for that I guess and tag my emails beforehand with the project ID.</p>
</blockquote>
<p dir="auto">That could work as well, but you might end up with a lot of tags.</p>
<blockquote>
<p dir="auto">What would be the correct syntax to pass my tagging info over to a bundle?</p>
</blockquote>
<p dir="auto">That's not straightforward. I think one would have to pass <code>#flags</code> (space-separated list) to the script and then search for the IMAP keyword of the tag.</p>
<p dir="auto">-- <br>
Benny</p>
</div>