Proxy ändern in Firefox// Problem mit Port ändern

07/19/2013 19:19 evoh12#1
Hey... ich hab schon wieder ein Problem:
Ich will den Port in Firefox ändern nur über eine Variable läuft es irgendwie nicht.

PHP Code:
#AutoIt3Wrapper_UseX64=n
#include <FF.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Hove\Desktop\KODAK Autoit\Forms\Votetest1.kxf
$Form1_1 GUICreate("Dark-Metin2 Vote Bot Copyright Evoh"827327272177)
$MenuItem3 GUICtrlCreateMenu("&Datei")
$Save GUICtrlCreateMenuItem("Speichern"$MenuItem3)
$Load GUICtrlCreateMenuItem("Laden"$MenuItem3)
$MenuItem4 GUICtrlCreateMenuItem("Beenden"$MenuItem3)
$MenuItem1 GUICtrlCreateMenu("&Help")
$MenuItem2 GUICtrlCreateMenuItem("Hilfe"$MenuItem1)
GUISetBkColor(0x000000)
$Ueberschirft GUICtrlCreateLabel("Test"304820128)
GUICtrlSetFont(-1148000"MS Sans Serif")
GUICtrlSetColor(-10xFFFFFF)
$Button1 GUICtrlCreateButton("Vote"704888125)
GUICtrlSetCursor (-10)
$Port1 GUICtrlCreateInput("Port 1"288885721)
$Port2 GUICtrlCreateInput("Port 2"2881285721)
$Port3 GUICtrlCreateInput("Port 3"2881685721)
$Port4 GUICtrlCreateInput(" Port 4"2882085721)
$Label4 GUICtrlCreateLabel("Ports"288563317)
GUICtrlSetFont(-188000"MS Sans Serif")
GUICtrlSetColor(-10xFFFFFF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
         Case 
$Button1
            _Func1 
()
    EndSwitch
WEnd

Func    _Func1 
()  
Sleep(1000)
;
Seite öffnen
$variable1 
GUICtrlRead($Port1)   ;Port 1
MsgBox
(0,"",$variable1)
_FFStart("http://www.google.de")
_FFPrefSet("network.proxy.type"1
_FFPrefSet("network.proxy.http_port"$variable1)  ; wenn ich statt $variable1 eine Zahl einfüge funktioniert es...
_FFOpenURL("http://www.google.de")
MsgBox(0,"",_FFPrefGet("network.proxy.http_port"))
EndFunc 
07/19/2013 19:31 Croco™#2
Es könnte daran liegen, das _FFPrefSet einen int Wert erwartet und durch das auslesen der Inputbox einen String bekommt. Versuch es mal mit
Quote:
_FFPrefSet("network.proxy.http_port", Int($variable1))
07/19/2013 19:57 evoh12#3
:D sehr gut dankeschön --> hat funktioniert