I Feel So Lame! How To Simply Select a File and Return its Path to Tasker?

37 views
Skip to first unread message

David White

unread,
Oct 14, 2016, 8:03:52 PM10/14/16
to File Magic
Seems like this should be a no-brainer. But I can't seem to figure it out. I simply want to use File Magic within a Tasker task to select a file and return its path to Tasker in the form of a variable. I cannot seem to discover how to do this simple thing. Any help/tips are appreciated. If not easily done is it possible to invoke another file manager app to do this - perhaps via start activity for result? Thanks

Crafty Apps Support

unread,
Oct 15, 2016, 12:22:00 PM10/15/16
to file...@googlegroups.com
Configure a Tasker Action in File Magic's prefs, in order
to run a task when something is selected.

Use the Browse Files action in Tasker to start File Magic.

When File Magic runs the task you configured for selection,
the path of whatever you long-clicked will be available to the task
in %PATH or %path, can't remember which.

Pent

David White

unread,
Oct 15, 2016, 2:14:56 PM10/15/16
to File Magic
As always, thanks Pent! It IS %PATH

kged...@gmail.com

unread,
Jan 13, 2017, 5:54:17 PM1/13/17
to File Magic
I'm trying to use file magic, but when I use the browse command from Tasker, it opens file magic, I can tap something and it attempts to open it, and the Tasker program is no longer running. If I long press the file it asks what I want to do, Select, Delete, etc, and does not go back to Tasker. When I get back to Tasker the script has stopped, and no file magic anything is happening. ??? I'm puzzled.

David White

unread,
Jan 13, 2017, 6:23:44 PM1/13/17
to File Magic, kged...@gmail.com
Let me see if I can help. I can attest that this is not as obvious as one would guess. But it can be made to work in many case, I am sure.

I have a UI menu with an item that, when chosen, opens the browser so the user can select a .ISO file to me mounted. This menu performs a task called ChooseMenu. ChooseMenu has a single step using this plugin's Browse Files action. This, of course, triggers File Magic to be shown and sets the current path to whatever you provide. I use relative naming to get to the root of my file system. I think I tried simply using / but that didn't work as I recall. So my value for Dir is ../../../../../

I then created a new task called MountIso which is invoked by FileMagic when a file is chosen. You build the task in the normal way and in it use the variable %PATH which holds the user's file selection. My task uses %PATH in an appropriate mount command.

You configure FileMagic to invoke this as a one-time configure step by opening it from the app drawer and using the menu to select Preferences->Takser Actions. In that screen I put MountIso in the #1 slot under File Actions.

That seems to do what I need. The MAY be other addons/plugins to do this in some other way. But I am not aware of them and this seems to be fine for the very occasional use I make of all this.

Cheers!

franc...@gmail.com

unread,
Jun 28, 2017, 3:45:48 PM6/28/17
to File Magic, kged...@gmail.com
Am Freitag, 13. Januar 2017 23:54:17 UTC+1 schrieb kged...@gmail.com:
I'm trying to use file magic, but when I use the browse command from Tasker, it opens file magic, I can tap something and it attempts to open it, and the Tasker program is no longer running. If I long press the file it asks what I want to do, Select, Delete, etc, and does not go back to Tasker. When I get back to Tasker the script has stopped, and no file magic anything is happening. ??? I'm puzzled.


This is exact my problem. I posted it already in the main Tasker group because I didnt discover that there is a separate File Magic Google Group.
The solution of David White from 14. Jan. 2017 doesn't apply to me, I just want to use the path of a file which I want to choose for use in a Task, which I dont want to leave. So File Magic should not call that task but continue where File Magic was called.
Possible that?


Frank Röhm

unread,
Jun 30, 2017, 2:03:55 PM6/30/17
to File Magic, kged...@gmail.com


Am Mittwoch, 28. Juni 2017 21:45:48 UTC+2 schrieb Frank Röhm:
...
Possible that?

Obviously not. I will need the "List Files" Action, see other group.
Reply all
Reply to author
Forward
0 new messages