Jump to content
Sign in to follow this  

Error on

Recommended Posts


(Sorry about topic title, I can't edit to "Can't load URL in IE Embedded")

I was code a tool use socks in a file Socks.txt to connect to google.com.

But have problem:

If file Socks.txt have 2 Socks5 (working all)

But this tool can check only first Socks. With other Socks5, IE Embedded can't load http://google.com again.

Please help me fix it.


My code:

#include <WindowsConstants.au3>
#include <Process.au3>
#include <File.au3>
#include <GUIConstantsEx.au3>
#include <IE.au3>
#Include <GuiEdit.au3>
#include <ComboConstants.au3>
#include <ButtonConstants.au3>
Global $DungSocks,$Running,$FILE1,$FILE2,$FILE3,$Y,$ALLSOCKS,$E,$VTS,$IN_Y,$IN_TONGSOCKS
Opt("GUIOnEventMode", 1)
_IEErrorHandlerRegister ()
$OIE = _IECreateEmbedded ()
GUICreate("TEST", 640, 490, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 490) / 2, _
GUICtrlCreateLabel("TEST", 190, 10, 260, 20)
$GUIActiveX = GUICtrlCreateObj($OIE, 10, 40, 620, 350)

$FSOCKS = "Socks.txt" ;File socks is Socks.txt
    MsgBox(4096, "Error", "Can't open file " & $FSOCKS, 60) ;If found file socks then get all socks to array $ALLSOCKS
Func USESOCKS() ;Function Get Socks
    If $Y >= $ALLSOCKS[0] Then ;If don't have more Socks then Exit
        $Tamdung = MsgBox(1, "Error", "Don't have more Socks in this file", 60)
    Else ;If have more Socks
        $Y = $Y + 1 ;Inc $Y
        $SOCKS = $ALLSOCKS[$Y] ;Get Socks with new $Y
        RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", "socks=" & $SOCKS) ;Set Socks to IE
        MsgBox(4096, "Wait", "Curent Socks is: " & $SOCKS, 60)
        CHECKIP() ;Check Socks
Func CHECKIP() ;Function Check Socks
    TrayTip("Testing", "CheckingIP", 10)
    _RunDos("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255") ;Delte IE files ...
    While ProcessExists("RunDll32.exe") ;Wait until delete copleted
    _IENAVIGATE($OIE, "http://google.com") ;Load google.com
    _IELOADWAIT($OIE) ;Wait until copleted
    $SHTML = _IEDOCREADHTML($OIE) ;View HTML source code
    $RESULT1 = StringInStr($SHTML, "google") ;Find string "google" in HTML source
    If $RESULT1 = 0 Then ;If Result1 = 0 then this Socks die
        MsgBox(4096, "Error", "Can't connect to Google. I will try againt with next Socks", 60)
        USESOCKS() ;Get next Socks to check
    Else ;If Result1 > 0 then Socks live
        MsgBox(4096, "OK", "Connected to Google.", 60)
While 1
Edited by vampirevn01

Share this post

Link to post
Share on other sites

Please help me T_T

Share this post

Link to post
Share on other sites


Please remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You just have to wait until someone who knows something about your particular problem, and is willing to help, comes online.

Be patient and someone will answer eventually. Or if not - tough! ;-)


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Share this post

Link to post
Share on other sites

Sorry, my program have Error :

If file Socks.txt like this:

One Socks5 die

One Socks5 live

then after checked Socks5 die, Can't load Google.com again with live socks.

The function _IENAVIGATE($OIE, "http://google.com") don't work again ^_^.

Share this post

Link to post
Share on other sites

Interesting way to see if you're connected to the internet. ;] Why don't you just ping google to see if you're connected?

Share this post

Link to post
Share on other sites

This is my problem too, but do you know how to using Command Line with Socks to PING google.com or using Internet Explorer to PING google.com ?

Share this post

Link to post
Share on other sites

Hey every body, I know why my program have Error.

Because when I using RegWrite to edit IE setting, the current _IECreateEmbedded DON'T re read this setting again, so IE can't load new socks. This is my problem.

Please help me, how to IE reload setting or how to reset the _IECreateEmbedded function.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this