以等待字符串eth0的出现,出现后或者20秒后脚本执行reboot命令的脚本为例,示例如下:
#$language = "VBScript" #$interface = "1.0" crt.Screen.Synchronous = True ' This automatically generated script may need to be ' edited in order to work correctly. Sub Main while 1 crt.Screen.WaitForString "eth0",20 #等待字符串eth0的出现,出现后或者20秒后脚本才继续执行后续内容 crt.Screen.Send chr(13) crt.Screen.Send "reboot" & chr(13) WEnd End Sub