Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 07:59

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



I want the edit in my autoit scripts for Autoit Proxy Switcher

Discussion on I want the edit in my autoit scripts for Autoit Proxy Switcher within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2013
Posts: 3
Received Thanks: 0
I want the edit in my autoit scripts for Autoit Proxy Switcher

I want the edit in my autoit scripts I want the edit in my autoit scripts for Autoit Proxy Switcher

1) I want to add the button for load proxy list
2) I want to add the button for changer ip address


my autoit
PHP Code:
#include <GUIConstantsEx.au3>
#include <GUIListViewEx.au3>

HotKeySet("{ESC}""_Terminate")

$GUI GUICreate("[Proxy Switcher]"235369493134)
$btnOk GUICtrlCreateButton("&ON / OFF"883366525)
$lstServer GUICtrlCreateList(""86421797)
$btnExit GUICtrlCreateButton("&Exit"16033665250)
$Group GUICtrlCreateGroup("Settings"828021749)
$optEnabled GUICtrlCreateRadio("Enabled"243047317)
$optDisabled GUICtrlCreateRadio("Disabled"1443047317)
GUICtrlCreateGroup("", -99, -9911)
$grpProxy GUICtrlCreateGroup("Proxy Server"8821749)
$lblProxy GUICtrlCreateLabel("lblProxy"243219217)
GUICtrlSetFont(-188000"MS Sans Serif")
GUICtrlCreateGroup("", -99, -9911)
$edtExceptions GUICtrlCreateEdit(""820021773)
GUICtrlSetData(-1"")
$Label GUICtrlCreateLabel("Exceptions:"81805917)
GUISetBkColor(0x808080)
GUISetState(@SW_SHOW)

If 
Not FileExists(@ScriptDir "\Proxy.ini"Then
    MsgBox
(48"File Not Found""Required file not found (" & @ScriptDir "\Proxy.ini" ")" & @CRLF "" & @CRLF "Proxy Switcher Will Exit!!!")
    Exit
EndIf

Get IE Proxy server Registry values
$sProxy 
RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings""ProxyServer")
$iEnabled RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings""ProxyEnable")
$sExceptions RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings""ProxyOverride")

If 
$iEnabled Then
    GUICtrlSetState
($optEnabled$GUI_CHECKED)
    
TrayTip("Proxy Server: "$sProxy51)
    
TraySetToolTip("Proxy Server: " $sProxy)
    
GUICtrlSetData($lblProxy$sProxy)
Else
    
GUICtrlSetState($optDisabled$GUI_CHECKED)
    
TrayTip("Proxy Server: ""Disabled(Direct Connection)"51)
    
TraySetToolTip("Proxy Server: Disabled(Direct Connection)")
    
GUICtrlSetData($lblProxy$sExceptions)
EndIf

GUICtrlSetData($edtExceptions$sExceptions)

;
Proxy servers configuration
$sSection 
IniReadSection(@ScriptDir "\Proxy.ini""config")
If @
error Then
    MsgBox
(16"Proxy Switcher""Unable to read the section Server")
    Exit
Else
    ;
Load ListBox
    Local $iLstIndex 
0
    
For $iSection 1 To $sSection[0][0]
        
GUICtrlSetData($lstServer$sSection[$iSection][0] & " ===> " $sSection[$iSection][1])
        If 
$sProxy $sSection[$iSection][1Then
            GUICtrlSetData
($grpProxy"Proxy: " $sSection[$iSection][0])
            
$iLstIndex $iSection 1
        
EndIf
    
Next
    
    
If $iLstIndex 0 Then
        $ret 
GUICtrlSetData($lstServer$iLstIndex)
    EndIf
 EndIf
 
GUISetState()

While 
1
    $msg 
GUIGetMsg()
    
Select
        
Case $msg $GUI_EVENT_CLOSE Or $msg $btnExit
            _Terminate
()

        Case 
$msg $btnOk
            _Start
()
    
EndSelect
WEnd

Func _Start
()
    ;
Proxy enabled
    
If GUICtrlRead($optEnabled) = $GUI_CHECKED Then
        $sTmpKey 
GUICtrlRead($lstServer)
        
$sKey StringLeft($sTmpKeyStringInStr($sTmpKey" ===> "))

        If 
$sKey "" Then
            MsgBox
(48"Error Message""No proxy selected")
        Else
            
$sProxy IniRead(@ScriptDir "\Proxy.ini""config"$sKey"NotFound")
            If @
error Or $sProxy "NotFound" Then
                MsgBox
(16"Proxy Switcher""Unable to read the Key " $sKey)
                Exit
             Else
                
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings""ProxyServer""REG_SZ"$sProxy)
                
TrayTip("Proxy Server: "$sProxy51)
                
TraySetToolTip("Proxy Server: " $sProxy)
                
GUICtrlSetData($lblProxy$sProxy)
                
GUICtrlSetData($grpProxy"Proxy: " $sKey)
            EndIf
        EndIf
        
        
$sExceptions GUICtrlRead($edtExceptions)
        
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings""ProxyEnable""REG_DWORD"1)
        
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings""ProxyOverride""REG_SZ"$sExceptions)
    Else
        ;
Proxy Disabled
        RegWrite
("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings""ProxyEnable""REG_DWORD"0)
        
TrayTip("Proxy Server: ""Disabled (Direct Connection)"51)
        
TraySetToolTip("Proxy Server: Disabled(Direct Connection)")
        
GUICtrlSetData($lblProxy"Disabled (Direct Connection)")
        
GUICtrlSetData($grpProxy"Proxy")
    EndIf
 
EndFunc   
 
Func _Terminate
()
    Exit 
0
 EndFunc 
Martyart5936 is offline  
Old 11/11/2013, 20:23   #2
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Create a button and trigger this if it is clicked
Code:
$sProxyPath = FileOpenDialog("Please select a file containing IP:PORT proxies", @ScriptDir, "All Data (*.*)")
alpines is offline  
Old 11/11/2013, 22:02   #3
 
elite*gold: 0
Join Date: Nov 2013
Posts: 3
Received Thanks: 0
Quote:
Originally Posted by alpines View Post
Create a button and trigger this if it is clicked
Code:
$sProxyPath = FileOpenDialog("Please select a file containing IP:PORT proxies", @ScriptDir, "All Data (*.*)")
You can add it in the script
Martyart5936 is offline  
Old 11/11/2013, 23:09   #4
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
I'm not going to do that, you have to do it by yourself so you won't ask easy questions like that anymore.
alpines is offline  
Old 11/11/2013, 23:40   #5
 
elite*gold: 0
Join Date: Nov 2013
Posts: 3
Received Thanks: 0
Quote:
Originally Posted by alpines View Post
I'm not going to do that, you have to do it by yourself so you won't ask easy questions like that anymore.
I do not know how
Martyart5936 is offline  
Reply




All times are GMT +2. The time now is 07:59.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.