Página 1 de 1

abrir web en firefox

Publicado: 27 Oct 2013, 23:13
por mikeeps2
amigo hola , tengo el codigo de una html pero me abre bien el firefox , como podria llamarlo con autoit y que me abra en firefox ? gracias ,

bueno buscando enconmtre este cofigo que abriria firefox pero no se como acoplarle mi html seria asi

Código: Seleccionar todo

Run("C:\Program Files\Mozilla Firefox\firefox.exe -new http://www.camera web.com/")

y mi html es este

<html>
<head>
<title>LiveVideo</title>
<META content="text/html"; charset="UTF-8"; http-equiv=Content-Type>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</head>
<body>


<tr><div class="box">
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr><td bgcolor=black > <font color=white> <BR></font>
</td></tr> </TABLE>
<iframe src="http://172.16.0.4:80/video.cgi" width="640" height="480"
class="smart_sizing_iframe noresize" frameborder="0" scrolling="no" ></iframe>
</div></tr>

</body>
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
</html>

Re: abrir web en firefox

Publicado: 28 Oct 2013, 03:39
por Dany
Si tienes el html en tu disco seria asi:

Código: Seleccionar todo

ShellExecute("firefox.exe","tuarchivohtml.html")


saludos

Re: abrir web en firefox

Publicado: 28 Oct 2013, 04:27
por mikeeps2
hola dany , te mande los dos archivos a tu privado , lo vistes , prove el commando que me pusistes aqui pero me abre el firefox pero no el html ,es una camara ip que compre y ese codigo html , lo encontre que solo abre la camara , pero no se si en firefox se podra abrir como en IE , encerado en un GUI , no se si se podra hacer con firefox para poder darle el tamano que yo quiero y la ubicacion

Re: abrir web en firefox

Publicado: 28 Oct 2013, 19:41
por Dany
Mira que te parece si haces algo asi:

Código: Seleccionar todo

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <WinAPI.au3>
#include <GDIPlus.au3>
#include <Memory.au3>

#region Global Vars
Global Const $sProgramTitle = "IP Camera stream + record"

;Coloca los datos Respectivos:
GLobal $Usuario="admin"
Global $Password=""
Global Const $iIPAddress = "", $iPort = 80, $shtauth = _Base64Encode($Usuario & ":" & $Password)

Global Const $STM_SETIMAGE = 0x0172

Global $blRecording = False, $blGUIMinimized = False
;Global Const $sRecordDir = @ScriptDir & "\ip_camera_stream"

Global $bRecvtmp = Binary(""), $bStream = $bRecvtmp
Global $iImgLen = 0, $iStreamLen = 0, $iWritten = 0, $iEOH = 0, $iContLenPos = 0, $hImgFile = 0, $pBuffer = 0, $iImgCount = 0
Global Const $iContLengthLen = StringLen("Content-Length: ")
Global $sStream = "", $sTrim2ContLen = ""

Global $hBMP = 0, $hGraphics = 0, $hHBITMAP2 = 0, $hFamily = 0, $hFont = 0, $tLayout = "", $hFormat = 0, $hBrush = 0
#endregion Global Vars

TCPStartup()

Global $iSocket = TCPConnect($iIPAddress, $iPort)
If @error Then
    MsgBox(16, $sProgramTitle, "Could not connect !")
    Exit -1
EndIf

TCPSend($iSocket, _
        "GET /mjpeg.cgi HTTP/1.1" & @CRLF & _
        "Host: " & $iIPAddress & ":" & $iPort & @CRLF & _
        "Connection: keep-alive" & @CRLF & _
        "Authorization: Basic " & $shtauth & @CRLF & @CRLF)

#region GUI
Global $hGUI = 0, $pPic = 0, $hPic = 0, $btnRecord = 0

$hGUI = GUICreate($sProgramTitle, 640, 525)

$pPic = GUICtrlCreatePic("", 0, 0, 640, 480, $SS_BITMAP)
GUICtrlSetState($pPic, $GUI_DISABLE)
$hPic = GUICtrlGetHandle($pPic)

$btnRecord = GUICtrlCreateButton("Record", 10, 490, 80, 26)

GUIRegisterMsg($WM_SYSCOMMAND, "WM_SYSCOMMAND")

GUISetState(@SW_SHOW, $hGUI)
#endregion GUI

_GDIPlus_Startup()

$hFamily = _GDIPlus_FontFamilyCreate("Arial")
$hFont = _GDIPlus_FontCreate($hFamily, 17)
$tLayout = _GDIPlus_RectFCreate(10, 10, 100, 40)
$hFormat = _GDIPlus_StringFormatCreate()
$hBrush = _GDIPlus_BrushCreateSolid(0xAFFF0000)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $btnRecord

    EndSwitch

    $bRecvtmp = TCPRecv($iSocket, 4096, 1) ;4kb
    If @error Then ExitLoop

    If Not BinaryLen($bRecvtmp) Then ContinueLoop
    $bStream &= $bRecvtmp

    If $iImgLen = 0 Then
        $sStream = BinaryToString($bStream)

        $iContLenPos = StringInStr($sStream, "Content-Length: ", 2)
        $iEOH = StringInStr($sStream, @CRLF & @CRLF, 2, 1, $iContLenPos)

        If $iEOH = 0 Or $iContLenPos = 0 Then ContinueLoop

        $sTrim2ContLen = StringTrimLeft($sStream, $iContLenPos + $iContLengthLen - 1)

        $iImgLen = Number(StringLeft($sTrim2ContLen, StringInStr($sTrim2ContLen, @CR, 2) - 1))

        $bStream = BinaryMid($bStream, $iEOH + 4)
    EndIf

    If $iImgLen = 0 Then ContinueLoop

    $iStreamLen = BinaryLen($bStream)
    If $iStreamLen < $iImgLen Then ContinueLoop

    If Not $blGUIMinimized Then
        $hBMP = Load_BMP_From_Mem($bStream)

        If $blRecording Then
            $hGraphics = _GDIPlus_ImageGetGraphicsContext($hBMP)
            _GDIPlus_GraphicsDrawStringEx($hGraphics, "[•REC]", $hFont, $tLayout, $hFormat, $hBrush)
        EndIf

        $hHBITMAP2 = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBMP)

        _WinAPI_DeleteObject(_SendMessage($hPic, $STM_SETIMAGE, 0, $hHBITMAP2))
		
		 
        _GDIPlus_ImageDispose($hBMP)
        If $blRecording Then _GDIPlus_GraphicsDispose($hGraphics)
        _WinAPI_DeleteObject($hHBITMAP2)
    EndIf

   $iImgLen = 0
WEnd

_GDIPlus_FontDispose($hFont)
_GDIPlus_FontFamilyDispose($hFamily)
_GDIPlus_StringFormatDispose($hFormat)
_GDIPlus_BrushDispose($hBrush)

_GDIPlus_Shutdown()

TCPCloseSocket($iSocket)
TCPShutdown()

Func WM_SYSCOMMAND($hWnd, $iMsg, $wParam, $lParam)
    Local Const $SC_MINIMIZE = 0xF020, $SC_RESTORE = 0xF120

    Switch BitAND($wParam, 0xFFF0)
        Case $SC_MINIMIZE, $SC_RESTORE
            $blGUIMinimized = Not $blGUIMinimized
    EndSwitch

    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_SYSCOMMAND

Func Load_BMP_From_Mem($bImage) ;_GDIPlus_BitmapCreateFromMemory2
    ;Author: UEZ
    ;Modified: ProgAndy, Yashied, FireFox
    If Not IsBinary($bImage) Then Return 0
    Local $memBitmap = Binary($bImage)
    Local $iLen = BinaryLen($memBitmap)
    Local $GMEM_MOVEABLE = 0x0002
    Local $aResult = DllCall("kernel32.dll", "handle", "GlobalAlloc", "uint", $GMEM_MOVEABLE, "ulong_ptr", $iLen)
    Local $hData = $aResult[0]
    $aResult = DllCall("kernel32.dll", "ptr", "GlobalLock", "handle", $hData)
    If @error Then Return 0
    Local $tMem = DllStructCreate("byte[" & $iLen & "]", $aResult[0])
    DllStructSetData($tMem, 1, $memBitmap)
    DllCall("kernel32.dll", "bool", "GlobalUnlock", "handle", $hData)
    If @error Then Return 0
    $aResult = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "handle", $hData, "int", True, "ptr*", 0)
    $hStream = $aResult[3]
    If @error Then Return 0
    $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromStream", "ptr", $hStream, "int*", 0)
    If @error Then Return 0
    DllCall('oleaut32.dll', 'long', 'DispCallFunc', 'ptr', $hStream, 'ulong_ptr', 8 * (1 + @AutoItX64), 'uint', 4, 'ushort', 23, 'uint', 0, 'ptr', 0, 'ptr', 0, 'str', '')
    Return $aResult[2]
EndFunc   ;==>Load_BMP_From_Mem


Func _Base64Encode($input)
	;Author: trancexx
	$input = Binary($input)

	Local $struct = DllStructCreate("byte[" & BinaryLen($input) & "]")

	DllStructSetData($struct, 1, $input)

	Local $strc = DllStructCreate("int")

	Local $a_Call = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _
			"ptr", DllStructGetPtr($struct), _
			"int", DllStructGetSize($struct), _
			"int", 1, _
			"ptr", 0, _
			"ptr", DllStructGetPtr($strc))

	If @error Or Not $a_Call[0] Then
		Return SetError(1, 0, "") ; error calculating the length of the buffer needed
	EndIf

	Local $a = DllStructCreate("char[" & DllStructGetData($strc, 1) & "]")

	$a_Call = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _
			"ptr", DllStructGetPtr($struct), _
			"int", DllStructGetSize($struct), _
			"int", 1, _
			"ptr", DllStructGetPtr($a), _
			"ptr", DllStructGetPtr($strc))

	If @error Or Not $a_Call[0] Then
		Return SetError(2, 0, ""); error encoding
	EndIf

	Return DllStructGetData($a, 1)
EndFunc   ;==>_Base64Encode


Coloca la IP en el campo respectivo y mira a ver que tal te funciona.


Saludos

PD: el código no es mio solo modifique unas cositas.

Re: abrir web en firefox

Publicado: 28 Oct 2013, 20:24
por mikeeps2
contra dany , eso funciona perfecto , dejame quitarle el boton de record , que no necesito eso , y abrir mas la pantalla

dany perfecto , ya le quite el boton de record , y abri la pantalla , abre perfecto y rapidisimo , dime pero usastes algo de los script de html que te mande ?

algo asi es que yo quisiera con las camaras del dvr , que me abra de una asi como esta , pero las cuadro camaras , no se podra este script adaptarlo al del dvr ? seria tremendo

Re: abrir web en firefox

Publicado: 28 Oct 2013, 20:58
por Dany
:smt023 :smt027

saludos

Re: abrir web en firefox

Publicado: 29 Oct 2013, 17:58
por mikeeps2
dany , esta trabajando perfecto el script , le hice yo algunos ajustes , y le quite el marco , y le puse los comandos para moverlo a la posicion que yo quiero ...

dany , una pregunta se puede con autoit asociar algun commando o orden de otro programa que autoit lo reconosca ... aver si me explico mejor , tu conoces el sistema de automazacion del hogar x10 , bueno lo que trato de ver es como autoit cuando reciba la orden de los comandos de x10 , el abra automaticamente el script que me hiciste de la camara , y a la ves suene el sonido de un timbre d casa , y luego a los 10 o 15 sec , se cierre automaticamente , la idea es que me compre un boton que manda senal de RF a un interface que va conectado a la corriente , entonces , cuando toco el boton , manda senal de RF al interface , y este manda senal a la computadora por el sistema de cables de la casa , entonces cuando la pc reciba ese comando , es el que yo quiero usar para que autoit lo reconosca , le de la orden al script de la camara pa que se abra y la misma ves me suene una musiquita de un timbre y luego de 10 o 15 se cierra el video de la camara .... pero lo curioso es que este boton solo manda senal de RF para prender , no manda para apagar ...



lo que como no estoy seguro que comando o que orden es la que realmente recibe la computadora cuando llega la senal del boton , me toca ir provando a ver cuando es la que reconoce , yo se que es la misma que cuando yo prendo una lamapara , en el plugin de las luces yo tengo

este es el comando que yo uso cuando prendo una lampara "x10sendplc;on;c2" claro el c2 se cambia segun el que use en el modulo que uso .... tambien por cada lampara yo tengo puesto un indicador , diciendome que se prendio esa lampara no se si ese comando del indicador se podra utilizar para darle la orden que cuando el vea ese indicador prendido , haga su trabajo , el comando del indicador es este x10_ind_c2 , tambien aqui , se cambia el c2 igual que el comando , para que ambos tengan relacion

la musiquita es esta , esta en wav

aqui esta el script modificado como quiero que salga

Código: Seleccionar todo

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <WinAPI.au3>
#include <GDIPlus.au3>
#include <Memory.au3>
#NoTrayIcon

#region Global Vars
Global Const $sProgramTitle = "IP Camera stream "

;Coloca los datos Respectivos:
GLobal $Usuario="admin"
Global $Password=""
Global Const $iIPAddress = "", $iPort = 80, $shtauth = _Base64Encode($Usuario & ":" & $Password)

Global Const $STM_SETIMAGE = 0x0172

Global $blRecording = False, $blGUIMinimized = False
;Global Const $sRecordDir = @ScriptDir & "\ip_camera_stream"

Global $bRecvtmp = Binary(""), $bStream = $bRecvtmp
Global $iImgLen = 0, $iStreamLen = 0, $iWritten = 0, $iEOH = 0, $iContLenPos = 0, $hImgFile = 0, $pBuffer = 0, $iImgCount = 0
Global Const $iContLengthLen = StringLen("Content-Length: ")
Global $sStream = "", $sTrim2ContLen = ""

Global $hBMP = 0, $hGraphics = 0, $hHBITMAP2 = 0, $hFamily = 0, $hFont = 0, $tLayout = "", $hFormat = 0, $hBrush = 0
#endregion Global Vars

TCPStartup()

Global $iSocket = TCPConnect($iIPAddress, $iPort)
If @error Then
    MsgBox(16, $sProgramTitle, "Could not connect !")
    Exit -1
EndIf

TCPSend($iSocket, _
        "GET /mjpeg.cgi HTTP/1.1" & @CRLF & _
        "Host: " & $iIPAddress & ":" & $iPort & @CRLF & _
        "Connection: keep-alive" & @CRLF & _
        "Authorization: Basic " & $shtauth & @CRLF & @CRLF)
		
		


#region GUI

Global Const $SC_DRAGMOVE = 0xF012
Global $hGUI = 0, $pPic = 0, $hPic = 0, $btnRecord = 0

;$hGUI = GUICreate($sProgramTitle,  640, 480, $WS_POPUP, $WS_BORDER, $WS_EX_TOPMOST)
$hGUI = GUICreate($sProgramTitle,  640, 480, _
(@DesktopWidth - 1020) / 2, (@DesktopHeight - 760) / 2, _
		$WS_POPUP)

$pPic = GUICtrlCreatePic("", 0, 0, 640, 480, $SS_BITMAP)
WinWait("IP Camera stream")
WinMove("IP Camera stream", "", 80, 80, 640, 480)

GUICtrlSetState($pPic, $GUI_DISABLE)
$hPic = GUICtrlGetHandle($pPic)



;$btnRecord = GUICtrlCreateButton("Record", 10, 490, 80, 26)

GUIRegisterMsg($WM_SYSCOMMAND, "WM_SYSCOMMAND")

GUISetState(@SW_SHOW, $hGUI)
#endregion GUI

_GDIPlus_Startup()

$hFamily = _GDIPlus_FontFamilyCreate("Arial")
$hFont = _GDIPlus_FontCreate($hFamily, 17)
$tLayout = _GDIPlus_RectFCreate(10, 10, 100, 40)
$hFormat = _GDIPlus_StringFormatCreate()
$hBrush = _GDIPlus_BrushCreateSolid(0xAFFF0000)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            ExitLoop
			
		 
		  Case $btnRecord
		 

    EndSwitch

    $bRecvtmp = TCPRecv($iSocket, 4096, 1) ;4kb
    If @error Then ExitLoop

    If Not BinaryLen($bRecvtmp) Then ContinueLoop
    $bStream &= $bRecvtmp

    If $iImgLen = 0 Then
        $sStream = BinaryToString($bStream)

        $iContLenPos = StringInStr($sStream, "Content-Length: ", 2)
        $iEOH = StringInStr($sStream, @CRLF & @CRLF, 2, 1, $iContLenPos)

        If $iEOH = 0 Or $iContLenPos = 0 Then ContinueLoop

        $sTrim2ContLen = StringTrimLeft($sStream, $iContLenPos + $iContLengthLen - 1)

        $iImgLen = Number(StringLeft($sTrim2ContLen, StringInStr($sTrim2ContLen, @CR, 2) - 1))

        $bStream = BinaryMid($bStream, $iEOH + 4)
    EndIf

    If $iImgLen = 0 Then ContinueLoop

    $iStreamLen = BinaryLen($bStream)
    If $iStreamLen < $iImgLen Then ContinueLoop

    If Not $blGUIMinimized Then
        $hBMP = Load_BMP_From_Mem($bStream)

        If $blRecording Then
            $hGraphics = _GDIPlus_ImageGetGraphicsContext($hBMP)
            _GDIPlus_GraphicsDrawStringEx($hGraphics, "[•REC]", $hFont, $tLayout, $hFormat, $hBrush)
        EndIf

        $hHBITMAP2 = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBMP)

        _WinAPI_DeleteObject(_SendMessage($hPic, $STM_SETIMAGE, 0, $hHBITMAP2))
      
      
        _GDIPlus_ImageDispose($hBMP)
        If $blRecording Then _GDIPlus_GraphicsDispose($hGraphics)
        _WinAPI_DeleteObject($hHBITMAP2)
    EndIf

   $iImgLen = 0
   
  
WEnd

_GDIPlus_FontDispose($hFont)
_GDIPlus_FontFamilyDispose($hFamily)
_GDIPlus_StringFormatDispose($hFormat)
_GDIPlus_BrushDispose($hBrush)

_GDIPlus_Shutdown()

TCPCloseSocket($iSocket)
TCPShutdown()



Func WM_SYSCOMMAND($hWnd, $iMsg, $wParam, $lParam)
    Local Const $SC_MINIMIZE = 0xF020, $SC_RESTORE = 0xF120

    Switch BitAND($wParam, 0xFFF0)
        Case $SC_MINIMIZE, $SC_RESTORE
            $blGUIMinimized = Not $blGUIMinimized
    EndSwitch

    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_SYSCOMMAND

Func Load_BMP_From_Mem($bImage) ;_GDIPlus_BitmapCreateFromMemory2
    ;Author: UEZ
    ;Modified: ProgAndy, Yashied, FireFox
    If Not IsBinary($bImage) Then Return 0
    Local $memBitmap = Binary($bImage)
    Local $iLen = BinaryLen($memBitmap)
    Local $GMEM_MOVEABLE = 0x0002
    Local $aResult = DllCall("kernel32.dll", "handle", "GlobalAlloc", "uint", $GMEM_MOVEABLE, "ulong_ptr", $iLen)
    Local $hData = $aResult[0]
    $aResult = DllCall("kernel32.dll", "ptr", "GlobalLock", "handle", $hData)
    If @error Then Return 0
    Local $tMem = DllStructCreate("byte[" & $iLen & "]", $aResult[0])
    DllStructSetData($tMem, 1, $memBitmap)
    DllCall("kernel32.dll", "bool", "GlobalUnlock", "handle", $hData)
    If @error Then Return 0
    $aResult = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "handle", $hData, "int", True, "ptr*", 0)
    $hStream = $aResult[3]
    If @error Then Return 0
    $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromStream", "ptr", $hStream, "int*", 0)
    If @error Then Return 0
    DllCall('oleaut32.dll', 'long', 'DispCallFunc', 'ptr', $hStream, 'ulong_ptr', 8 * (1 + @AutoItX64), 'uint', 4, 'ushort', 23, 'uint', 0, 'ptr', 0, 'ptr', 0, 'str', '')
    Return $aResult[2]
EndFunc   ;==>Load_BMP_From_Mem


Func _Base64Encode($input)
   ;Author: trancexx
   $input = Binary($input)

   Local $struct = DllStructCreate("byte[" & BinaryLen($input) & "]")

   DllStructSetData($struct, 1, $input)

   Local $strc = DllStructCreate("int")

   Local $a_Call = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _
         "ptr", DllStructGetPtr($struct), _
         "int", DllStructGetSize($struct), _
         "int", 1, _
         "ptr", 0, _
         "ptr", DllStructGetPtr($strc))

   If @error Or Not $a_Call[0] Then
      Return SetError(1, 0, "") ; error calculating the length of the buffer needed
   EndIf

   Local $a = DllStructCreate("char[" & DllStructGetData($strc, 1) & "]")

   $a_Call = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _
         "ptr", DllStructGetPtr($struct), _
         "int", DllStructGetSize($struct), _
         "int", 1, _
         "ptr", DllStructGetPtr($a), _
         "ptr", DllStructGetPtr($strc))

   If @error Or Not $a_Call[0] Then
      Return SetError(2, 0, ""); error encoding
   EndIf

   Return DllStructGetData($a, 1)
EndFunc   ;==>_Base64Encode

Re: abrir web en firefox

Publicado: 31 Oct 2013, 04:59
por Dany
En lo ultimo no te puedo ayudar porque desconozco totalmente ese sistema.

habría que debuggear la aplicación a la que se conecta originalmente ese sistema.


saludos

Re: abrir web en firefox

Publicado: 31 Oct 2013, 06:50
por mikeeps2
hola dany , ya , solucione la parte abrir la camara ip y ajuntarle el sonido del timbre , le di hasta tiempo , y volumen , todo lo hace automatico , donde estoy trabado es lo unico que me falta es como hacer un pequenito script , que cuando detecte ese comando de cuando presiso el boton ,me mande una orden para que me abra el programita de la camara ... es que no se que relamente cual comando se podra usar de referencia , lo que si tengo que hice las pruebas hoy es cuando yo presiso el boton del timbre , en mi programa yo tengo unos indicadores de las lamaparas cuando estan prendidas o apagadas , no se si se podra tomar eso de referencia , el caso es que cuando presiono el boton del timbre , manda la senal a pc y este indicador se prende , no se si darle la orden cuando el vea , detecte o que se yo , ese comando del indicador prendido , que mande la orden a que habra la camara


dentro del plugin de mi programa , yo encontre esto
For Each ID In DeviceId
If LCase(IND) = "x10_ind_" & LCase(ID) Then
ReturnIndicatorEx = IIf(ActiveHomeObj.SendAction("queryplc", ID & " on") = 1, "True", "False")
End If

cada indicador tiene este comando "X10_IND_XX" , el que corresponde con el boton del timbre es "X10_IND_K9"

no se eso sirva para tmarlo de referencia , cuando el vea ese comando true , de la orden que llame el script de la camara ....

otra cosa , se podra ponerle al script que me hicistes separado en forma de .ini , la parte del IP , puerto , username y password , para no tener que entrar al script y tenerlo afuera para si tengo que cambiarlo , no se si me entiendes

Re: abrir web en firefox

Publicado: 31 Oct 2013, 07:35
por mikeeps2
dany lei un post tuyo acerca del .ini , y trate de hacerlo pero me sale error

esto fue lo que agregue

Global $Usuario = IniRead("CAMERA.ini", "sectionUsuario", "Usuario", "NotFound")
GLobal $Password = IniRead("CAMERA.ini", "sectionPassword", "Password", "NotFound")
Global $iIPAddress = IniRead("CAMERA.ini", "sectioniIPAddress", "iIPAddress", "NotFound")
Global $iPort = IniRead("CAMERA.ini", "sectioniPort", "iPort", "NotFound")

y en el CAMERA.ini , puse esto

Usuario = "admin"
Password = ""
iIPAddress = "172.16.0.4"
iPort = 80

Re: abrir web en firefox

Publicado: 31 Oct 2013, 14:00
por Dany
Proba asi:

Código: Seleccionar todo

;asi Los escribes
Local $Usuario =IniWrite("CAMERA.ini", "sectionUsuario", "Usuario", "aquielussuario")
Local $Password = IniWrite("CAMERA.ini", "sectionPassword", "Password", "aquilaclave")
Local $iIPAddress = IniWrite("CAMERA.ini", "sectioniIPAddress", "iIPAddress", "aquiIP")
Local $iPort =IniWrite("CAMERA.ini", "sectioniPort", "iPort", "Puerto")



;Asi los lees
Global $Usuario = IniRead("CAMERA.ini", "sectionUsuario", "Usuario", "No hay nada")
GLobal $Password = IniRead("CAMERA.ini", "sectionPassword", "Password", "No hay nada")
Global $iIPAddress = IniRead("CAMERA.ini", "sectioniIPAddress", "iIPAddress", "No hay nada")
Global $iPort = IniRead("CAMERA.ini", "sectioniPort", "iPort", "No hay nada")



ConsoleWrite( $Usuario & @CRLF  & $Password & @CRLF & $iIPAddress & @CRLF & $iPort & @CRLF)
saludos

Re: abrir web en firefox

Publicado: 31 Oct 2013, 17:19
por mikeeps2
aver si entendi , quito lo yo abria agregado y agrego esto que tu me pusistes ahora , hice eso y no funciona

Re: abrir web en firefox

Publicado: 01 Nov 2013, 14:58
por mikeeps2
dany , tengo un problemita , en esta pc que escribo , el scritp trabaja perfecto , lo abro una ves y abre , lo cierro , lo abro de nuevo y perfecto , y lo cierro , y lo vuelvo abrir (3 ves ) y abre perfecto y lo cierro , y asi todas las veces que lo abra , pero en la pc que el va aestar trabajando , lo abro una ves , bien , lo abro dos veces y bien pero la 3 ves que lo abro , se queda el cuadro del video en blanco o gris , y al poco rato sale la imagen de la camara , y asi todas las veces que lo abra despues , para que vuelva a salir bien m, tengo que esperar un ratico sin abrirlo , y asi se repite el proceso ..... sera que la otra pc , la que esta fallando , le falta algo ? , este script con que navegador el se abriria , IE o firefox ? o el usa flashplayer ? o active X , o java ? es que ando viendo a ver que le falta a la otra , que esta tiene


bueno , buscando en las dos pc , la otra lo que tiene diferene es que el java esta en firefox sale disabled , no se si eso tenga que ver

o lo que tu dices sera definir un tiempo , se podra denifir un tiempo que abra y cierre