Page 2 of 2

Re: DIY-Actions: Execute Command, Execute Root Command

Posted: 02 Sep 2013 16:09
by Martin
Hi,

Ensure to add a trigger to the flow first since this will provide the variable triggertime to the flow. The variable selection dialog should contain some example formats (when editing the action: Menu->Select Variable).

You can get the formatted time and date as follows:
/mnt/sdcard/screencap_{triggertime,dateformat,yyyyMMdd_HHmmss}.png

Please also check this page: Date Format Pattern

Regards,
Martin

Re: DIY-Actions: Execute Command, Execute Root Command

Posted: 23 Oct 2013 05:23
by houdinix64
I need help. I can't find a way to execute pressing the " Back button (hardware key)" ?

Re: DIY-Actions: Execute Command, Execute Root Command

Posted: 23 Oct 2013 09:05
by MURTUMA
In the third post is a link to all key codes and their numeric equivalents. The numbers should work on all devices.

Martin: could you update that link to the first post so people find that more easily?

Re: DIY-Actions: Execute Command, Execute Root Command

Posted: 23 Oct 2013 16:22
by Martin
Sure, added the link to the first post.

Re: DIY-Actions: Execute Command, Execute Root Command

Posted: 13 May 2016 14:35
by Bushmills
The mv command as part of your shell script doesn't have Automagic variables within its scope. Two ways to solve that are:
1. Pass variables as command arguments to your script, read them in your script as positional parameters ("command line arguments"), or
2. use equivalent variables or command output, provided or generated by shell. For example, by
"mv file $(date +%s).ext"