Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-12-2021, 06:22 PM
BjoernH BjoernH is offline
Registered User
 
Join Date: Mar 2018
Posts: 55
Need advice with a simple WaitForStrings query

Good day.

This is supposed to be a simple little script but it's giving me a hard time.

Code:
crt.Screen.Synchronous = True

Sub Main
Dim result
	crt.Screen.Send "grep ^Release /tspinst/scripts/aiParameter.sh|awk -F'=' '{print $2}'" & chr(13)
	result = crt.Screen.WaitForStrings("17.5","19.02", 4)
	MsgBox result
	If result = "17.5" Then 
		crt.Dialog.MessageBox "Release 17"
	Else
		crt.Dialog.MessageBox "Release 19"
	End If
End Sub
When I run this script on a R17.5 system, it returns "Release 19" in the messagebox and 'MsgBox result' returns a "1"

On a R19.02 system the result is also "Release 19" and the 'MsgBox result' returns a "2".

Please advise.

Bjoern
Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 04:42 PM.