The Tasker Command System enables a lot of flexibility when creating actions with custom behaviour.
It works in the same way as the AutoApps Command System but instead of using the AutoApps Command plugin condition you use the native Command event condition in Tasker.
For example, you could use the Power Menu Action action in Tasker to create Android 11 Power Menu action where you can launch an app. Instead of having a different task for each app ýou want to launch you can simply set it to send a Command like
launchapp=:=Chrome
And then setup a profile with the Command event condition with the Command filter set to
launchapp=:=*
and variables set to
%app
Then in the task simply use the Launch App action and launch the app in the %app variable.
If you ever want to launch an app from anywhere else where a command can be sent you can do so by sending a command like
launchapp=:=Gmail
to launch the Gmail app for example.
Here's what that would look like in Tasker.
This would be the Task that would setup the action:
Setup Power Menu (168)
A1: Power Menu Action [ ID:Smart App Action:Add/Edit Type:Button Title:Chrome Subtitle:Browse the Web Icon:content://net.dinglisch.android.taskerm.iconprovider/app/com.android.chrome Command:launchapp=:=Chrome ]
And this would the profile that reacted to the command:
Profile: Open App With Command (169)
Restore: no
Event: Command [ Output Variables:* Command:launchapp=:=* Variables:%app Last Variable Is Array:Off ]
Enter: Anon (170)
A1: Launch App [ Package/App Name:%app Data: Exclude From Recent Apps:Off Always Start New Copy:Off ]
For more info please check out the AutoApps Command System where the command structure is explained in detail.