Coucou,
J'en viens a demander conseil a tous ceux qui sont sur ce forum, car après moultes tentatives, je n'ai pas réussit a solved my problem.
J'explique :
Je veux récuperer l'image renvoyé par une caméra IP/POE dans une GUI le tout en autoit. (ceci est la première partie de mon script).
Cette caméra utilise un Objet ActiveX propre à son constructeur, contenant 4 fonctions (allumer video/eteindre // son)
J'ai déja quelque chose de fonctionnel en HTML
► Afficher le texte
Code : Tout sélectionner
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>IvViewer</title>
<object codebase="IvViewer.cab" id="IvViewerCab" classid="CLSID:40F0D6E2-134F-42B3-AB08-048FD8F08453">
</object>
<script type="text/javascript">
<!--
/* Transport type may be 1-3 for UDP Multicast, TCP, Tunnelled (in that order)
Add 1 to the selectedIndex value (0-2) to obtain the transport type (1-3)
*/
function startVideo()
{
var ipaddr = "192.168.220.156";
var encoderid = 1;
var streamid = 1; /* 0 ici pour 25 images/sec*/
var transtype = 2;
if ( ipaddr == "" )
{
alert( 'Please specify an IP address and try again.' );
return 0;
}
viewer.StartVideo( ipaddr, encoderid, streamid, transtype );
return 0;
}
function stopVideo()
{
viewer.StopVideo();
}
function startAudio()
{
var transtype = document.forms['videocontrol'].TransType.selectedIndex + 1;
viewer.StartAudio( transtype );
}
function stopAudio()
{
viewer.StopAudio();
}
// -->
</script>
</head>
<body onload="startVideo();">
<p>
<object classid="clsid:40F0D6E2-134F-42B3-AB08-048FD8F08453" id="viewer" width="528" height="432" codebase="IvViewer.ocx" >
<param name="_Version" value="65536">
<param name="_ExtentX" value="9313">
<param name="_ExtentY" value="7620">
<param name="_StockProps" value="0">
</object>
</p>
</body>
</html>
Puis en VB
► Afficher le texte
Code : Tout sélectionner
[url=http://www.casimages.com][img]http://nsa27.casimages.com/img/2011/10/05/111005035301407628.jpg[/img][/url]
Donc voila, j'ai commencer un petit truc sous autoit, mais je ne trouve pas la suite (jamais taffer sur du object activeX, et j'avoue que le forum anglais n'est pas très fournit de ce genre de question)
► Afficher le texte
Code : Tout sélectionner
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 414, 312, 192, 124)
global $Obj1 = ObjCreate("INDIGOVIEWER.IndigoViewerCtrl.1")
global $Obj1_ctrl = GUICtrlCreateObj($Obj1, 56, 16, 300, 258)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $ipaddr = "192.168.220.156"
Global $encoderid = 1
Global $streamid = 1
Global $transtype = 2
go()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func Go()
;$lol = ObjGet("", "clsid:40F0D6E2-134F-42B3-AB08-048FD8F08453" )
$Obj1.startvideo( $ipaddr, $encoderid, $streamid, $transtype )
EndFunc
Merci de ceux qui pourront m'apporter leur aide
Jérôme