An example of my current script:
#include <A3LScreenCap.au3> Global $ControlledComputerIP = "192.168.0.11" Global $ControlledComputerPort = 65432 Global $Socket Global $Connected = "NO" While 1 If $Connected = "YES" Then ;Take Screenshot to ScreenShot.jpg _ScreenCap_SetJPGQuality (50) _ScreenCap_Capture ("ScreenShot.jpg") ;Set $DATA with the content of ScreenShot.jpg $File = FileOpen("ScreenShot.jpg", 0 + 16); 0=read + 16=binary $DATA = "(START)" & FileRead($File) & "(END)" FileClose($File) ;Send the ScreenShot to the server SendFunc($DATA) Else ServerNegociation() EndIf Sleep(1000) WEnd Func ServerNegociation() ;~ ; Start The TCP Services ;~ ;============================================== ;~ TCPStartup() ;~ ; Connect to a Listening "SOCKET" ;~ ;============================================== ;~ $Socket = TCPConnect($ControlledComputerIP, $ControlledComputerPort) ;~ If $Socket = -1 Then ;~ TCPShutdown() ;~ $Connected = "NO" ;~ Else $Connected = "YES" ;~ EndIf EndFunc ;==>ServerNegociation Func SendFunc($DATA) ;~ ;Send DATA to the server ;~ TCPSend($Socket, $DATA) ;~ If @error Then ;~ TCPShutdown() ;~ $Connected = "NO" ;~ $Socket = -1 ;~ EndIf EndFunc ;==>SendFuncoÝ÷ Ù8^IÊÞzt¡¢Ø¬Â¸zí áö§æ~º&¶Â¢jnµêÀmçèèq©ÛzǧvÚ¢jnµêÁßr0j{[y¦åzÚ¢Ê&zØb bëaȧ¶)^.)jëh×6#include <A3LScreenCap.au3> Global $ControlledComputerIP = "192.168.0.11" Global $ControlledComputerPort = 65432 Global $Socket Global $Connected = "NO" Global $hBitmap While 1 If $Connected = "YES" Then ; ;Take Screenshot _ScreenCap_SetJPGQuality (50) $hBitmap = _ScreenCap_Capture () ;Set $DATA with the content of $hBitmap $DATA = "(START)" & $hBitmap & "(END)" ;Send the ScreenShot to the server SendFunc($DATA) ; Else ServerNegociation() EndIf Sleep(1000) WEnd Func ServerNegociation() ;~ ; Start The TCP Services ;~ ;============================================== ;~ TCPStartup() ;~ ; Connect to a Listening "SOCKET" ;~ ;============================================== ;~ $Socket = TCPConnect($ControlledComputerIP, $ControlledComputerPort) ;~ If $Socket = -1 Then ;~ TCPShutdown() ;~ $Connected = "NO" ;~ Else $Connected = "YES" ;~ EndIf EndFunc ;==>ServerNegociation Func SendFunc($DATA) ;~ ;Send DATA to the server ;~ TCPSend($Socket, $DATA) ;~ If @error Then ;~ TCPShutdown() ;~ $Connected = "NO" ;~ $Socket = -1 ;~ EndIf EndFunc ;==>SendFunc
What can i do with $hBitmap to get the binary string of the screenshot?
Currently $hBitmap = 0x240508E0
I really need help with the manipulation HBITMAP handle to get the result I want.
Edited by crash748, 11 September 2007 - 04:41 PM.






