I've been running into a limitation of the Output screen. There seems to be a limitation to the number of lines which can be displayed from a script. The following script will demonstrate the issue:
For i = 1 To 99999
WScript.Echo i & vbTab & "Display a line of text on the screen"
Next
When I run the script from a CMD prompt, it finishes without issue. When I run it from within primalscript, it "hangs" at the entry when the variable "I" is equal to 1765. Is there a limitation to the number of lines of output within primalscript?
Output buffer limitation
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Output buffer limitation
There is no line limitation. It appears that depending on processor speed the stdout buffer of the external process gets overwhelmed.
You can insert a
WScript.Sleep 10
as a work around while we investigate.
The amount of milliseconds depends on machine it seems.
You can insert a
WScript.Sleep 10
as a work around while we investigate.
The amount of milliseconds depends on machine it seems.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Double Reddog
- Posts: 14
- Last visit: Mon Oct 16, 2017 8:17 am
Re: Output buffer limitation
The sleep command allowed the output to display a little over 31000 items and then hung. I suspect increasing this to 20 ms will be better (on my computer). Thanks for the work around. I'll use that until an update is available.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Output buffer limitation
You didn't indicate which actual PrimalScript version you use.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Double Reddog
- Posts: 14
- Last visit: Mon Oct 16, 2017 8:17 am
Re: Output buffer limitation
I'm using version 7.0.30. BTW, I change the sleep time to 20 ms and it did not "hang" when run via primalscript.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Output buffer limitation
This will be resolved with the next service build. (7.0.32)
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.