-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for calling other TagUI scripts within a script #80
Comments
Hi @terrygoldman I have thought of implementing this at some point in time. Can you share more about your thoughts some ways that can be done? Thinking aloud, on-the-fly invoking a separate instance of TagUI from command-line may be a bad idea, lack of context of parent process and the underlying 'infra' (CasperJS / PhantomJS / Sikuli) should have conflicts. Another approach could be prior to interpreting the script into JS code, perform an iterative parsing of a new step that calls another TagUI script filename. The end result is generating a fully expanded script without further calls to other scripts. And then start the parsing translation into JS code. Another area that I need to tackle is to make TagUI extensible so that users can create their own modules / plugins / steps or whatever you call it, and perhaps some easy way to overwrite TagUI's default steps behavior. The ability to call other TagUI scripts for reusability, and an extension framework are two areas which I had been holding back on implementing. It may suddenly open up much more possible uses and attract a lot more users than I can handle. But I think the time is now ripe to start working on dramatic enhancements to TagUI. |
With this commit, users can now create reusable TagUI scripts that can be called from other scripts. In this way, scripts can be compounded to do some much more complicated, while keeping the flow readable and reusable. A .raw file will be created to store a copy of the expanded script prior to parsing the TagUI language into the JavaScript file for execution. More details in the issue #80
Made a commit with following comments - With this commit, users can now create reusable TagUI scripts that can be called from other scripts. In this way, scripts can be compounded to do some much more complicated, while keeping the flow readable and reusable. A .raw file will be created to store a copy of the expanded script prior to parsing the TagUI language into the JavaScript file for execution. |
@terrygoldman you can give a try by downloading the cutting edge version from here to replace your existing installation. To call your reusable or sub scripts start off the line with tagui followed by the filename, either relative or absolute.
Object repository for sub-scripts is not enabled to reduce complexity and the chance of creating scripts too complicated for understanding or debugging. Closing the issue for now. |
Thanks Ken, sorry for the delay in responding, been busy with the day job. BR, |
Hey Terry no probs at all, I'm closing the issue to focus on working on some of the outstanding ideas to explore. Do let me know if you run into issue calling subscripts using the above Let me know too your thoughts, if there is a way to improve on the current implementation. I chose the word |
Sure, will do over the weekend and get back to you on this.
BR,
Terry
On 6 Mar 2018, at 23:50, Ken Soh <notifications@github.com<mailto:notifications@github.com>> wrote:
Hey Terry no probs at all, I'm closing the issue to focus on working on some of the outstanding ideas to explore. Do let me know if you run into issue calling subscripts using the above tagui step and I'll reopen the issue to track when needed.
Let me know too your thoughts, if there is a way to improve on the current implementation. I chose the word tagui instead of programming convention call or include or require, so that the same word can be used even for other languages. As TagUI supports writing scripts in over 20 human languages, something like call or include can be translated and I got a hunch doing that can introduce bugs later on.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#80 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AiI5Tc7KtzUfu6-hB_NMPmshSzNdw7Pjks5tbrAwgaJpZM4SUKWR>.
|
Adding on, besides following naming convention -
Users can also use something like below to make it easier to organize their 'action libraries'. By naming the filename as some context . followed by some action.
For example, below will expand a TagUI script named as mainscreen.login to perform the login actions.
|
It would be great to have the the ability to create a library of functions that include actions, blocks of code that I can reuse from script to script.
example:
include include.filename
This feature would allow us to create reusable code and provide the ability to rapidly create new scripts based on previous work.
best regards,
Terry
The text was updated successfully, but these errors were encountered: