You could just nest a few FOR - NEXT loops.
Code:
Break on
$Pre="10.198."
$Oct3="10.","40.","50.","51.","54.","65.","70."
For each $Oct in $Oct3
For $Oct4=0 to 255
$ShellCMD="C:\KiXScripts\portchek "+$Pre+$Oct+$Oct4+" 36794"
Shell $ShellCMD
If @error
"No listener on port 36794 of "+$Pre+$Oct+$Oct4 ?
Else
"YIKES! LISTENER FOUND ON PORT 36794 OF "+$Pre+$Oct+$Oct4 ?
Beep
EndIf
Next
Next
"That's all folks!"?
Get $_

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.