AutoIt Library for AMCP 2.1

#1
Hey. Just to share there the UDF (list of functions) I made available on the AutoIt forum in case people look for an alternative for official client or the two libs on Github.

I don't put the file there since new versions will be uploaded directly on AutoIt forum, and probably will release my client one day too (after it's used widely in our production for e-sport events)
https://www.autoitscript.com/forum/topi ... g-amcp-21/

Code: Select all

#cs ----------------------------------------------------------------------------

	AutoIt Version: 3.3.13.20 (Beta)
	Author:         MALOSSANE TIMOTHEE
	Version : 0.9
	Description:
	AutoIt library to connect to CasParCG server
	Currently supports AMCP 2.1 Protocol
	http://casparcg.com/wiki/CasparCG_2.1_AMCP_Protocol



	List of functions
	MAIN CASPARCG FUNCTIONS
		00 => AMCP_LoadBG($Param, $Param2, $Param3 = "") ;http://casparcg.com/wiki/CasparCG_2.1_AMCP_Protocol#LOAD
		01 => AMCP_Load($Param, $Param2) ;http://casparcg.com/wiki/CasparCG_2.1_AMCP_Protocol#LOAD
		02 => AMCP_Play($Param, $Param2) ;http://casparcg.com/wiki/CasparCG_2.1_AMCP_Protocol#PLAY
		03 => AMCP_Pause()
		04 => AMCP_Resume()
		05 => AMCP_Stop()
		06 => AMCP_Clear($Param)
		07 => AMCP_ClearChannel($Param = "1")
		08 => AMCP_ClearLayer($Param, $Param2 = "1")
		09 => AMCP_Swap($Param, $Param2, $SwapTransforms = False)
		10 => AMCP_SwapWithTransForms($Param, $Param2)
		11 => AMCP_CaptureToPNG($Param = 1)
		12 => AMCP_Mix($CHANNEL_LAYER = "1", $COMMAND = "", $bWaitForAnswerBeforeReturn = False)

	HELP/INFO FUNCTIONS
		13 => AMCP_GetVersion($Param = "")
		14 => AMCP_Help($Param = "")
		15 => AMCP_Restart()
		16 => AMCP_Kill()
		17 => AMCP_GetInfos($Param)
		18 => AMCP_ListMedias($Param)
		19 => AMCP_ListMedias($Param = "")
		20 => AMCP_ListFonts()
		21 => AMCP_ListTemplates($Param = "")
		22 => AMCP_ListChannels()

	CUSTOM FUNCTION
		23 => AMCP_CustomCommand($Param, $WaitForAnswer = True)

	NETWORK INTERNAL FUNCTIONS, DO NOT USE IF YOU DON'T KNOW WHAT YOU'RE DOING
		24 => AMCP_Send($hSocket, $sText, $bWaitForAnswerBeforeReturn = False, $iWaitForAnswerTimeOut = 5000)
		25 => AMCP_ResponseReceived($hSocket, $sReceived, $iError)
		26 => AMCP_ParseResponse(ByRef $iHeaderCode, ByRef $sBody, $sTxt)
		27 => AMCP_Connect($sIPAddress = "127.0.0.1", $iPort = 5250)
		28 => AMCP_Connected($hSocket, $iError) ; Event driven
		29 => AMCP_Disconnected($hSocket, $iError) ; Event driven
		30 => AMCP_Disconnect($iSocket)
		31 => AMCP_Log($__text)
		32 => AMCP_SetTCPTimeout($iTimeout = 100)

	QUEUE FUNCTIONS
		33 => AMCP_AddToQueue
		34 => AMCP_SendQueue
		35 => AMCP_ClearQueue
#ce ----------------------------------------------------------------------------
cron