View Single Post
  #4  
Old 05-02-2019, 10:45 AM
Ginfizz Ginfizz is offline
Registered User
 
Join Date: Feb 2019
Posts: 5
My code is actually just that snippet as I was testing to see what was causing the issue. WaitForStrings works fine in VBS but Python seems to be working differently, though its likely just me not understanding.

Here is the full code.

Code:
#$language = "python"
#$interface = "1.0"

def main():
	result = crt.Screen.WaitForStrings(">","#", 5)
	crt.Screen.Send(result)
	
	
main()
I was trying to see what value it was outputting once it timed out. Received the error and then tried the following:

Code:
#$language = "python"
#$interface = "1.0"

def main():
	result = crt.Screen.WaitForStrings(">","#")
	crt.Screen.Send(result)
	
main()
That also gives the exact same error, a TypeError asking for an Integer. Normally this script above should just sit there indefinitely. But instead it returns an error and doesn't run.


Code:
#$language = "VBScript"
#$interface = "1.0"

Sub Main

result = crt.Screen.WaitForStrings(">","#", 5)
crt.Screen.Send(result)

End Sub
The VBScript works fine and returns 0 at the end of the timeout.

Seems to only be an issue with Python.
Reply With Quote