Sign in to follow this  
Followers 0
hijolin

HOw to make this VBS script work in AutoIt

3 posts in this topic

host=inputbox("IP:")

port=inputbox("port:")

Set socket=WScript.CreateObject("MSWinsock.Winsock","winsock_")

socket.Protocol=0

socket.RemotePort=port

socket.RemoteHost=host

socket.connect

for a=1 to 30

WScript.sleep 10

next

msgbox("port "&socket.remoteport&" close!")

socket.close

WScript.quit

Sub winsock_connect()

msgbox("port "&socket.remoteport&" open!")

socket.close

WScript.quit

end sub

Share this post


Link to post
Share on other sites



hi

if noone helps you its because noone understood your question what you really want..

i can only guess too : try to search in forum for the tcpip codes of autoit..

Share this post


Link to post
Share on other sites

I guess this is what it translates to, but I can't get it to do anything on my laptop

$host=inputbox("Enter IP","IP:")
$port=inputbox("EnterPort","port:")
Local  $socket=Objcreate("MSWinsock.Winsock","winsock_")
$socket.Protocol=0
$socket.RemotePort=$port
$socket.RemoteHost=$host
$socket.connect
for $a=1 to 30
sleep (10)
next
msgbox(0,"","port " & $socket.remoteport & " close!")
$socket.close
;WScript.quit


Func winsock_connect()
msgbox(0,"","port " & $socket.remoteport & " open!")
$socket.close
;WScript.quit
EndFunc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0