@geek
Hi, I am using your Socket.ahk, but im having trouble figuring out how to fix the issues on my script. my scripts freezes everytime connect() failed. I want it to exit or do nothing when it fails to connect to the IP address.
Socket.ahk
-
- Posts: 63
- Joined: 01 Sep 2020, 09:49
Re: Socket.ahk
im try to connect to my Mikrotik board
but no lucky.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
;#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#Include Socket.ahk
MiServer = 200.48.103.1
MiPuerto = 8728
Servidor := new SocketTCP()
Resultado := Servidor.Connect([MiServer, MiPuerto])
Servidor.SendText("/login")
Servidor.SendText("/login=name=test=response=00test")
RespuestaLogin := Servidor.Rec()
MsgBox, %RespuestaLogin%
Servidor.SendText("/user/getall")
Respuesta := Servidor.RecText()
MsgBox, %Respuesta%
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 129 guests