[MlMt] Ask for user input in a bundle

Benny Kjær Nielsen mailinglist at freron.com
Sun Sep 21 06:26:50 EDT 2014


On 21 Sep 2014, at 9:56, Alexander Kucera wrote:

> is it possible to query the user for input when running a bundle?

Yes, you could, for example, use AppleScript for this. The hardest part 
is finding [the 
documentation](https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html#//apple_ref/doc/uid/TP40000983-CH216-SW12).

Here is a useful one-liner:

	osascript -e 'tell app "System Events" to return text returned of 
(display dialog "Give me some text" default answer "")'

> 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).
>
> The alternative would be to use tagging for that I guess and tag my 
> emails beforehand with the project ID.

That could work as well, but you might end up with a lot of tags.

> What would be the correct syntax to pass my tagging info over to a 
> bundle?

That's not straightforward. I think one would have to pass `#flags` 
(space-separated list) to the script and then search for the IMAP 
keyword of the tag.

-- 
Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20140921/fd0e3d0a/attachment.html>


More information about the mailmate mailing list