3/28/2023 10:55 AM | |
Joined: 7/15/2020 Last visit: 10/25/2024 Posts: 23 Rating: (2) |
Hi. I have 2 global scripts modules. With some functions inside. 1) Update
2) Events
A scheduled action is programmed to launch NewEvent() when a variable changes. NewEvent() do some actions and call ShowEvent(). Up to here everything is working fine. When ShowEvent() try to call GetCurrentTime(), ShowEvent() exists with an exception. let data = GetCurrentTime( date ); Why ? ( GetCurrentTime was tested an works when calling from a button ) |
3/28/2023 11:14 AM | |
Joined: 7/15/2020 Last visit: 10/25/2024 Posts: 23 Rating: (2) |
The debugger displays this information.
The NewEvent_Update() task is called from a scheduler task and adds hidden imports when a function is called from the task scheduler. Can I add import module inside a global function ? I'll like to call module_update.GetCurrentTime( date ); from inside NewEvent(); but I can't, |
3/28/2023 7:11 PM | |
Joined: 1/21/2013 Last visit: 1/22/2025 Posts: 3449 Rating: (543) |
Hi, You will also need to import your function into Events. So add an import statement to the global selection.
to use Update.GetCurrentTime() or
to use it as GetCurrentTime(). Kind regards |
This contribution was helpful to1 thankful Users |
3/29/2023 6:59 AM | |
Joined: 7/15/2020 Last visit: 10/25/2024 Posts: 23 Rating: (2) |
Works. Thanks a lot ! |
Follow us on