Javascript: how to create own library for Tasker?

530 views
Skip to first unread message

Teasüti

unread,
Sep 12, 2013, 3:53:19 PM9/12/13
to tas...@googlegroups.com
Just make a file.js and specialize all my own function() and prototype in it one by one?
How to add this to the Libraries parameter? May I move this file to a specific directory, or...?
User guide not so talkative about this. :)

Thank you!

Teasüti

unread,
Sep 12, 2013, 3:54:50 PM9/12/13
to tas...@googlegroups.com
Will App Factory package libraries too?

Pent

unread,
Sep 13, 2013, 2:39:58 AM9/13/13
to tas...@googlegroups.com

Just make a file.js and specialize all my own function() and prototype in it one by one?

Sure.

How to add this to the Libraries parameter?

Insert the file path in the Libraries box (on a new line if you have others).

Will update the docs.
 
Pent

Pent

unread,
Sep 13, 2013, 2:42:19 AM9/13/13
to tas...@googlegroups.com

Will App Factory package libraries too?


No, it's still on the App Factory todo list. If you put it on a server you can reference it
with http(s) however.

Pent

Pent

unread,
Sep 13, 2013, 2:42:58 AM9/13/13
to tas...@googlegroups.com
Or you could do a Write File with the contents of the library as part of your app's launch task.

Pent

Pent

unread,
Sep 13, 2013, 2:44:30 AM9/13/13
to tas...@googlegroups.com
Userguide (Javascript):

<H4>JavaScript(let): Libraries</H4>

You can specify as many libraries as you want in the <I>Libraries</I> parameter,
separated by newlines.
<P>
Several popular libraries are pre-selectable.
</P>
<P>
You may wish to download them manually to your local storage and change the <I>http</I> URL
to a <I>file</I> URL so that Internet is not required to run your script.
</P>

<P>
Important: if you are using your own libraries developed on Windows, you may need to convert
CRLF style line endings to Unix style LF.
</P>

Danielo515

unread,
Jul 6, 2014, 3:21:18 PM7/6/14
to tas...@googlegroups.com
Is this part of Tasker's javascript documentation? Because I have been very frustrated until I found this information in this thread.
Reply all
Reply to author
Forward
0 new messages