Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

User Image
Manuel Rozier de Linage
17 discussion posts
Hello,
Would it be possible to improve or add another RunFunction so that extra variables could be passed in as arguments or returned as arguments?
That would be useful when calling another scripted function.

Best Regards,
Manuel Rozier de Linage
Jul 30, 2018 (modified Jul 31, 2018)  • #1
User Image
Manuel Rozier de Linage
17 discussion posts
Ok after struggling some time to do it using temporary files,
I found out that I can pass variables amongst scripted functions (nice to build sub-functions bricks)
using the https://www.displayfusion.com/ScriptedFunctions/Help/#bfs_scriptsettings

This should definitly be described in the
https://www.displayfusion.com/ScriptedFunctions/Help/#bfs_displayfusion_runfunction
section of online help.

By the way I discovered during my tests that the RunFunction is not synchronous but asynchronous!
(Because offre this my main function was reading the variable I was setting in my sub function before the sub function was setting it...)

This is quite error-prone and should be indicated with a big warning in the RunFunction (and probably RunFunctionWithWindowHandle) online help

=> I had to use another variable as a flag to indicate the sub-function completion and have the main function loop until the sub-function flag is set to synchronyze both functions : I think a synchronous RunFunction-like function should be useful if added to the current function list.
Jul 31, 2018 (modified Jul 31, 2018)  • #2
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks for the feedback! I'll pass these suggestions along to the devs and see if they can put them in.
Jul 31, 2018  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
We've just released a new DisplayFusion beta version (https://www.displayfusion.com/Download/Beta/) and there are now two new scripting functions:

RunFunctionAndWait
RunFunctionAndWaitWithWindowHandle

Thanks!
Aug 24, 2018  • #4
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)