You made a valid point, but that’s not what I meant; otherwise, I wouldn’t have asked you for the PM
Custom js functions not found
-
Hello everyone,
this is my first post and first of all I would like to say that BAS is amazing software, congratulations!
My problem is: I am creating my own functions (javascript) in the item "Tools"> "Execute code".
But my own js functions do not work when they are called within a BAS function (function created through the GUI)Note: "Record Mode" works normally, but in "Run Mode" an error occurs.
See the error in "run mode":
Success (0)
Fails (1)
Messages:
1 - [948151773] ReferenceError: Can not find variable: doSomething during execution of action 948151773
Time Spent: 00:00
Final Message: Too Much FailsSome questions:
-> Are my functions declared in the wrong place ("Tools"> "Execute code")?
-> How to create global functions in javascript that are accessible anywhere in the script?See my project ...
0_1559936007807_test-functions.xmlBest Regards
Thank you very much.BAS version: 21.8.1 (Free)
OS version: Windows 10, x64 -
@asdbr said in Custom js functions not found:
Hello everyone,
this is my first post and first of all I would like to say that BAS is amazing software, congratulations!
My problem is: I am creating my own functions (javascript) in the item "Tools"> "Execute code".
But my own js functions do not work when they are called within a BAS function (function created through the GUI)Note: "Record Mode" works normally, but in "Run Mode" an error occurs.
See the error in "run mode":
Success (0)
Fails (1)
Messages:
1 - [948151773] ReferenceError: Can not find variable: doSomething during execution of action 948151773
Time Spent: 00:00
Final Message: Too Much FailsSome questions:
-> Are my functions declared in the wrong place ("Tools"> "Execute code")?
-> How to create global functions in javascript that are accessible anywhere in the script?See my project ...
0_1559936007807_test-functions.xmlBest Regards
Thank you very much.BAS version: 21.8.1 (Free)
OS version: Windows 10, x64The OnApplicationStart function is executed separately before all threads start; you can transfer data from it through global variables or resources:
-
Hello, thanks for the answer
The problem is the project works well only "Record Mode", but dont in "Run Mode".
Transfer my custom js function to OnApplicationStart does not solve the problem.Record mode

Run mode

I believe this is a bug. I'm thinking how to solve it, I would like to run my scripts in "run mode" too.
Thanks!
