List of variables and functions

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
Posts: 103
Joined: 11 Oct 2013 03:48

List of variables and functions

Post by ZSasha » 11 Oct 2013 04:00

Hello everyone,

first of all - my respect to the author, the program looks great!
Especially I like how it treats SMS (for location purposes) and the GUI is really nice.
I came from kind of Tasker background so now these two things impressed me much as well as dramatically lower memory footprint.
My phone is an old one and has only 512M and Tasker uses around 23M whereas Automagic just 16. Well done!!

However I should admit some things are bit more user-friendly in Tasker and one particular is variables.
The way how variables being handled in Tasker is really good. You can select a variable from a list and not to type it manually.
Is it something that could be (or may be has already been) done for Automagic as well?

If not - well, I suppose I could live with it but were is the documentation about predefined (global) variables on the site?
I've found info about triggers, conditions, actions but not about variables (internal predefined) and functions (should Automagic have them).

Could somebody point me to that section of the web site?

Thank you

User avatar
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: List of variables and functions

Post by Martin » 11 Oct 2013 06:50


Thanks, I'm glad you like Automagic :-)

Automagic has a general menu entry to select the available variables when you edit an action/condition. Step 5 (screenshot 2&3) of the tutorial shows how this works: Tutorial
The list will show all available global variables and the local variables available in the flow at this point. Automagic generally does not supply global variables on its own, the variables in a flow are provided by a trigger or a previously executed condition or action.

Example flow:
-trigger Periodic Timer: every 5m
-condition Battery Level: higher than 50%
-->true: -action Notification on Screen: {battery_percentage,numberformat,0}

The trigger provides the variable trigger_time with the date/time the trigger started the flow.
The condition provides the variables battery_level, battery_percentage, battery_plugged and many more. The variables can be used in the flow after the condition has been executed.
The notification-action itself does not provide additional variables to the flow.

The help page of each trigger, condition and action lists the variables in a section at the bottom of the help page, for example condition Battery Level.

The functions available in scripts can be inserted in the action Script when you press the button Function. The functions are also documented on the help page of action Script (see [?]-button in the app or online).


Post Reply