Sign in to follow this  
Followers 0
Damein

Help with an API

2 posts in this topic

Hello everyone. I was wondering if anyone could help me decipher how to utilize the Steam API for server queries.

Documentation: https://developer.valvesoftware.com/wiki/Server_Queries#A2S_INFO

Just curious how I can send a URL to get back said information.

Thanks!


MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

So I've gotten a bit further..

#include <MsgBoxConstants.au3>



; I am the client, start me after the server! (Start first the UDPSend/Recv example script and select "1. Server").

Example()

Func Example()
    UDPStartup() ; Start the UDP service.

    ; Register OnAutoItExit to be called when the script is closed.
    OnAutoItExitRegister("OnAutoItExit")

    ; Assign Local variables the loopback IP Address and the Port.
Local $sIPAddress = "***.***.***.***"
Local $iPort = 27015

    ; Assign a Local variable the socket and connect to a Listening socket with the IP Address and Port specified.
    Local $aSocket = UDPOpen($sIPAddress, $iPort)

    ; If an error occurred display the error code and return False.
    If @error Then
        Local $iError = @error
        MsgBox(BitOR($MB_SYSTEMMODAL, $MB_ICONHAND), "", "Could not connect, Error code: " & $iError)
        Return False
    Else

;~         MsgBox($MB_SYSTEMMODAL, "", "Connection successful.")
        UDPSend($aSocket, "Map")
        $sReceived = UDPRecv($aSocket, 3)
        MsgBox(0, "Test", $sReceived)

    EndIf

    ; Close the socket.
    UDPCloseSocket($aSocket)
EndFunc   ;==>Example

Func OnAutoItExit()
    UDPShutdown() ; Close the UDP service.
EndFunc   ;==>OnAutoItExit

Now using the example from the help file when I attempt a connection I do get a msgbox stating connection was successful. Now I just need to know how to communicate with it.

Any advice?

Edited by Damein

MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

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