This article applies to:
Using a While...Wend statement in an experiment causes ScriptSense to break and CPU usage to rise.
While...Wend statements are effectively deprecated in E-Prime due to the problems they cause. In ScriptSense, the Wend statement does not highlight, auto-completion breaks, and incorrect words become incorrectly colored. Additionally, you can observe the rise in CPU usage in Task Manager when using a While...Wend statement.
For more information on While...Wend, please view the following E-Prime Command Reference topic: https://pstnet.com/ecr/#t=E-Basic%2FW%2FWhile...Wend-E-Basic_Language_Object.htm.
NOTE: There is no planned BugFix at this time. We strongly encourage using the Workaround.
Instead of a While...Wend statement, use a Do...Loop:
' Uncomment out the Wend in order to instantly
' break script sense (watch CPU in Task Manager)
Display.Canvas.Text 0, 0, "Performing Test"
Dim myBoo As Boolean
myBoo = True
' Do NOT use While...Wend. Use the Do...Loop below.
'While myBoo = True
'myBoo = False
' The Do...Loop.
Do While myBoo = True
myBoo = False