-
Notifications
You must be signed in to change notification settings - Fork 212
Closed
Labels
enhancementscriptingIssues related to Scripts or the scripting APIIssues related to Scripts or the scripting API
Milestone
Description
Classification:
Enhancement to the scripting API
Version
AutoKey version: All < 0.96.0
Summary
Add functionality to call scripts like functions.
Proposal:
- Add further optional arguments (
*args, **kwargs
) toengine.run_script(script_name)
- Arguments can be accessed using a getter function. Something like
engine.get_macro_arguments()
? - Return values can be set using the existing
engine.set_return_value()
- engine.run_script() should return the value set by
engine.set_return_value()
Notes
There is a possible workaround that involves using the global scripting store. It takes quite some effort to use, because it is persistent and needs to be cleared after usage to not carry old data.
Metadata
Metadata
Assignees
Labels
enhancementscriptingIssues related to Scripts or the scripting APIIssues related to Scripts or the scripting API