Socket.ahk

Post your working scripts, libraries and tools for AHK v1.1 and older
vanheartnet098
Posts: 61
Joined: 01 Sep 2020, 09:49

Re: Socket.ahk

26 Aug 2022, 10:10

@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.
robo_z
Posts: 6
Joined: 21 Nov 2015, 15:54

Re: Socket.ahk

05 Mar 2024, 16:56

im try to connect to my Mikrotik board

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%
but no lucky.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 79 guests