Jump to content

Zio

Members
  • Posts

    3
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Zio

  1. Yes, that should pretty much do it. If it doesn't work let us know, so we can find out whats going on
  2. You should, inside the function, use Return instead of setting $bcomputer to False, cuz that won't change the original variable (the one you used to call the function). In that way, instead of setting $bcomputer = FALSE you should use Return False Remember that when calling the function you should do it like $bcptrexists = True $bcptrexists = _PingTestCheck ($bcptrexists) That way, when exiting the function and assuming you used Return, if $bcptrexists is changed to False, it will also be changed to False outside the function. I guess that will most likely work out for ya.
  3. I don't get why TCPnametoIP didn't work for you, i tried it using an array and it worked just fine. If you're only lookinforward on finding out the ipaddress seens to me you should use StdoutRead instead of running cmd prompt. There must be easier ways, but heres my way out #include <Constants.au3> #include <String.au3> Global $ctrlarray[3] $ctrlarray[2] = "sed063" ; Network Computer Name Func _FindIP ($hostname) $ping = Run ("Ping " & $hostname & ' -n 1', @SystemDir, @SW_HIDE, $STDOUT_CHILD) ProcessWaitClose ($ping) $pingresult = StdoutRead($ping) $ip = _StringBetween ($pingresult, '[', ']') Return $ip[0] EndFunc $ip = _FindIP ($ctrlarray[2]) MsgBox (0, "IP number", $ip)
×
×
  • Create New...