Jump to content
Sign in to follow this  
Vindicator209

_IENavigate Slow...

Recommended Posts

Vindicator209

Erm, sorry for the title, I didn't know what else to say for a problem I can't find... anyway, I have this small program for dealing with myspace stuff, and it has to load about 6 pages all at once, and the _IENavigate slowed it, so I put a 0 to at the end of it to make it load the rest of the script while that loads, but now instead of being slow, the GUI doesn't come up at all, so I reverted it back, and the problem persists... I Re-Compiled it, incase it was something wrong wit hthe compilation process, but no dice...

Thanks, any help appreciated, or any help that could optimize the script in any way...

HotKeySet("^S","stop")
#include <GUIConstants.au3>
#include <IE.au3>
SplashImageOn("","PrgmFiles\SPLASH.BMP","600","300","-1","-1",3)
Sleep(4000)
$timer=TimerInit()
$stopped = 0
$paused = 0
$sleep = 200
_IEErrorHandlerRegister()
$oIE = _IECreateEmbedded()
$oIE2 = _IECreateEmbedded()
$oIE3 = _IECreateEmbedded()
$oIE4 = _IECreateEmbedded()
$oIE5 = _IECreateEmbedded()
$oIE6 = _IECreateEmbedded()
$oIE7 = _IECreateEmbedded()
InetGet("http://www.geocities.com/kylemoy/nfo.txt","nfo.txt")
$nfoload=FileRead("nfo.txt")
$Form1 = GUICreate("Myspace NUKE Browser :: Photon Studios :: Kyle Moy", 634, 514, 193, 115)
$Browser = GUICtrlCreateTab(0, 30, 633, 433)
$TabSheet2 = GUICtrlCreateTabItem("MySpace")
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 53, 631, 410)
GUICtrlCreateTabItem("")
$TabSheet3 = GUICtrlCreateTabItem("Kyle's Myspace")
$GUIActiveX = GUICtrlCreateObj($oIE3, 0, 53, 631, 410)
GUICtrlCreateTabItem("")
$TabSheet4 = GUICtrlCreateTabItem("ASCII Generator")
$GUIActiveX = GUICtrlCreateObj($oIE4, 0, 53, 631, 410)
GUICtrlCreateTabItem("")
$TabSheet5 = GUICtrlCreateTabItem("Glitter Generator")
$GUIActiveX = GUICtrlCreateObj($oIE5, 0, 53, 631, 410)
GUICtrlCreateTabItem("")
$TabSheet6 = GUICtrlCreateTabItem("MySpace Sources")
$GUIActiveX = GUICtrlCreateObj($oIE6, 0, 53, 631, 410)
GUICtrlCreateTabItem("")
$TabSheet7 = GUICtrlCreateTabItem("MySpace NUKE HomePage")
$GUIActiveX = GUICtrlCreateObj($oIE7, 0, 53, 631, 410)
GUICtrlCreateTabItem("")
$Label1 = GUICtrlCreateLabel("Comments Sent:", 0, 472, 81, 17)
$Input1 = GUICtrlCreateInput("0", 80, 472, 65, 21)
$Prev = GUICtrlCreatePic("PrgmFiles\ARROWLEFT.BMP", 0, 0, 28, 30, BitOR($SS_NOTIFY,$WS_GROUP))
$Next = GUICtrlCreatePic("PrgmFiles\ARROWRIGHT.BMP", 28, 0, 29, 30, BitOR($SS_NOTIFY,$WS_GROUP))
$AdressBar = GUICtrlCreateCombo("Http://www.myspace.com", 56, 5, 545, 30)
$Button1 = GUICtrlCreatePic("PrgmFiles\CHECK.BMP", 600, 0, 33, 30)
$Label2 = GUICtrlCreateLabel("Time Spent:", 152, 472, 61, 17)
$Input3 = GUICtrlCreateInput("0", 216, 472, 49, 21)
$Label3 = GUICtrlCreateLabel("secs.", 264, 472, 29, 17)
$Label4 = GUICtrlCreateLabel("INFO:", 304, 472, 32, 17)
$Marquee = GUICtrlCreateObj($oIE2, 336, 467, 289, 25)
$filemenu01 = GUICtrlCreateMenu("Spam")
$fileitem01 = GUICtrlCreateMenuitem("Start", $filemenu01)
$fileitem02 = GUICtrlCreateMenuitem("Pause", $filemenu01)
$fileitem03 = GUICtrlCreateMenuitem("Stop", $filemenu01)
$filemenu02 = GUICtrlCreateMenu("Speed")
$fileitem05 = GUICtrlCreateMenuitem("Default (200 ms)", $filemenu02)
GUICtrlSetState(-1,$GUI_CHECKED)
$fileitem06 = GUICtrlCreateMenuitem("Fast (150 ms)", $filemenu02)
$fileitem07 = GUICtrlCreateMenuitem("Super Fast (100 ms)", $filemenu02)
$fileitem09 = GUICtrlCreateMenuitem("UNSTABLE OMFG (10 ms)", $filemenu02)
$fileitem10 = GUICtrlCreateMenuitem("NUKE ROFLMAO (1 ms)", $filemenu02)
$filemenu03 = GUICtrlCreateMenu("Auto Refresher")
$fileitem08 = GUICtrlCreateMenuitem("Start", $filemenu03)
_IENavigate($oIE7, "http://www.freewebs.com/vindicatoromega/index.htm",0)
_IENavigate($oIE6, "http://www.freecodesource.com/",0)
_IENavigate($oIE5, "http://www.glitterbank.com/generators/glitter.php",0)
_IENavigate($oIE4, "http://www.network-science.de/ascii/",0)
_IENavigate($oIE3, "http://www.myspace.com/the1337h4k3r",0)
_IENavigate($oIE2, "about:blank")
_IEDocWriteHTML ($oIE2, '<body scroll=no topmargin=0><marquee>'&$nfoload&'</marquee></body>') 
If Not IsDeclared('White') Then Local $White = 0xffffff
GUISetBkColor($White)
GUISetState(@SW_SHOW)
_IENavigate($oIE, "http://www.myspace.com")
SplashOff()
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $fileitem08
            WinSetTitle("Myspace NUKE Browser","","Myspace NUKE Browser - PRESS CTRL + SHIFT + S TO STOP")
            Do
            If $stopped = 0 Then
                _IENavigate($oIE, _IEPropertyGet($oIE,"locationurl"))
                Sleep($sleep*2)
            EndIf
            Until $stopped = 1
        Case $fileitem07
            $sleep = 100
            GUICtrlSetState($fileitem10,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem07,$GUI_CHECKED)
            GUICtrlSetState($fileitem06,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem05,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem09,$GUI_UNCHECKED)
        Case $fileitem06
            $sleep = 150
            GUICtrlSetState($fileitem10,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem07,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem06,$GUI_CHECKED)
            GUICtrlSetState($fileitem05,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem09,$GUI_UNCHECKED)
        Case $fileitem05
            $sleep = 200
            GUICtrlSetState($fileitem10,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem07,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem06,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem09,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem05,$GUI_CHECKED)
        Case $fileitem09
            $sleep = 10
            GUICtrlSetState($fileitem10,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem07,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem06,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem05,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem05,$GUI_CHECKED)
        Case $fileitem10
            $sleep = 1
            GUICtrlSetState($fileitem10,$GUI_CHECKED)
            GUICtrlSetState($fileitem07,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem06,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem05,$GUI_UNCHECKED)
            GUICtrlSetState($fileitem05,$GUI_UNCHECKED)
        Case $fileitem03
            $stopped = 1
        Case $fileitem02
            If $paused = 1 Then
                $paused = 0
                GUICtrlSetState($fileitem02,$GUI_UNCHECKED)
            Else
                $paused = 1
                GUICtrlSetState($fileitem02,$GUI_CHECKED)
            EndIf
        Case $fileitem01
            WinSetTitle("Myspace NUKE Browser","","Myspace NUKE Browser - PRESS CTRL + SHIFT + S TO STOP")
            $oForm = _IEFormGetObjByName($oIE, "aspnetForm")
            $oText = _IEFormElementGetObjByName($oForm, "ctl00$Main$postComment$ConfirmPostButton")
            _IEFormElementSetValue($oText, "!! CONTROLLED !!")
            $time = InputBox("Myspace Nuke", "Send How Many Comments? (1 = Infinite ;If using NUKE speed, use this Infinite)")
            $res = 1
            $timer = TimerInit()
            Do
            If $paused = 0 Then
                GUICtrlSetData($Input1,$res)
                GUICtrlSetData($Input3,Round(TimerDiff($timer) / 1000, 0))
                _IEAction($oText, "click")
                Sleep($sleep)
                $res = $res + 1
            EndIf
            If $stopped = 1 Then
                $res=$time
                $stopped = 0
            EndIf
            Until $res = $time
        Case $Button1
            GUICtrlSetImage($Button1,"PrgmFiles\CHECKDOWN.BMP")
            _IENavigate($oIE,GUICtrlRead($AdressBar))
            GUICtrlSetData($TabSheet2,_IEPropertyGet($oIE,"title"))
            _IENavigate($oIE,GUICtrlRead($AdressBar))
            GUICtrlSetImage($Button1,"PrgmFiles\CHECK.BMP")
        Case $Prev
            GUICtrlSetImage($Prev,"PrgmFiles\ARROWLEFTDOWN.BMP")
            _IEAction($oIE, "back")
            Sleep(100)
            GUICtrlSetImage($Prev,"PrgmFiles\ARROWLEFT.BMP")
        Case $Next
            GUICtrlSetImage($Next,"PrgmFiles\ARROWRIGHTDOWN.BMP")
            _IEAction($oIE, "forward")
            Sleep(100)
            GUICtrlSetImage($Next,"PrgmFiles\ARROWRIGHT.BMP")
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Func stop()
    $stopped=1
    WinSetTitle("Myspace NUKE Browser - PRESS CTRL + SHIFT + S TO STOP","","Myspace NUKE Browser")
EndFunc
Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites
DaleHohm

Sorry, you'll need to try to cut this down to a short reproducer.

One suggestion to try would be to navigate each embedded browser to "about:blank" immediately after each GUICtrlCreateObj

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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  

×