You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rnd in vba_library.py could use a rnd = random.Random() from the VBA context with an initial seed like rnd.seed(0.3477367247528699) (Python3), which would return a similar initial value. It would take more searching to get a seed that would emulate subsequent Rnd calls. Randomize could then set a new rnd = random.Random() for subsequent calls in that context.
Using a list of actual Rnd values from VBScript could be added as a list. It is simpler, but Rnd calls after the list is exhausted would not be consistent.
The Rnd function does not return 71 if Randomize is not called.
Steps to reproduce the behavior:
Execute script:
71 should be returned, unless Randomize is called before Rnd.
https://devblogs.microsoft.com/scripting/how-can-i-generate-random-numbers-using-a-script/
The text was updated successfully, but these errors were encountered: