Sign in to follow this  
Followers 0
JoshDB

Wierd load webpage error

9 posts in this topic

Hey guys, I have a question. Everything in the GUI works fine, but after closing it throws an "autoit3.exe has encountered an error and has to be closed. We are sorry for the inconvenience" error. Here's mycode: (Sorry for all the includes, but it is most efficient way for a group of developers to contribute small additions or changes of code)

SLB.au3 - Run this script

#include <GUIConstants.au3>

#include "lib_utility.au3"
#include "lib_net.au3"
#include "slb_mainui.au3"
oÝ÷ ÚXºØ¥Ü»v®¶­sdvÆö&Âb33c´uT ¤gVæ2fFTâ FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c´uTÂgV÷C¶çBgV÷C²Â#ÂgV÷C¶ÆöærgV÷C²Â uT6WE7FFR¤VæDgVæ0 ¤gVæ2fFT÷WB FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c´uTÂgV÷C¶çBgV÷C²ÂÂgV÷C¶ÆöærgV÷C²Â  uT6WE7FFR5uôDR¤VæDgVæ0 ¤gVæ2&÷VæDuT6÷&æW'2b33c¶÷vâÂb33c¶÷ÒÂb33c¶÷ÒÂb33c¶÷2Ò#BÂb33c¶÷2Ò#B¢FÒb33c·÷2Âb33c·&WBÂb33c·&WC ¢b33c·÷2ÒvävWE÷2b33c¶÷vâ¢b33c·&WBÒFÆÄ6ÆÂgV÷C¶vF3"æFÆÂgV÷C²ÂgV÷C¶ÆöærgV÷C²ÂgV÷C´7&VFU&÷VæE&V7E&vâgV÷C²ÂgV÷C¶ÆöærgV÷C²Âb33c¶÷ÂgV÷C¶ÆöærgV÷C²Âb33c¶÷ÂgV÷C¶ÆöærgV÷C²Âb33c·÷5³%ÒÂgV÷C¶ÆöærgV÷C²Âb33c·÷5³5ÒÂgV÷C¶ÆöærgV÷C²Âb33c¶÷2ÂgV÷C¶ÆöærgV÷C²Âb33c¶÷2¢bb33c·&WE³ÒFVà¢b33c·&WC"ÒFÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶ÆöærgV÷C²ÂgV÷Cµ6WEvæF÷u&vâgV÷C²ÂgV÷C¶væBgV÷C²Âb33c¶÷vâÂgV÷C¶ÆöærgV÷C²Âb33c·&WE³ÒÂgV÷C¶çBgV÷C²Â¢bb33c·&WC%³ÒFVà¢&WGW&â¢VÇ6P¢&WGW&â¢VæD`¢VÇ6P¢&WGW&â¢VæD`¤VæDgVæ0 oÝ÷ ÚXëZ»v®¶­sb6æ6ÇVFRfÇC´uT6öç7FçG2æS2fwC° ¤gVæ2ÆöEvV'vRb33c·GRÒÂb33c·W&ÂÒgV÷C¶GG¢ò÷6Æ"æ¦÷6F"æ6öÒöW'&÷"æFÖÂgV÷C²Âb33c·ÒÂb33c·ÒÂb33c·rÒÂb33c¶Ò 6VÆV7@ 66Rb33c·GRÒ b33c¶ôRÒö&¤7&VFRgV÷Cµ6VÆÂäWÆ÷&W"ã"gV÷C²  b33cµ6æ´ö&¦V7CÔö&¤WfVçBb33c¶ôRÂgV÷C´TWfVçEògV÷C²ÂgV÷C´EvV$'&÷w6W$WfVçG2gV÷C² bW'&÷"FVà &WGW&â VæF`  b33c´uT7FfUÒuT7G&Ä7&VFTö&¢b33c¶ôRÂb33c·Âb33c·Âb33c·rÂb33c¶  b33c¶ôRææfvFRb33c·W& 66Rb33c·GRÒ b33c¶ôRææfvFRb33c·W& 66Rb33c·GRÒ  b33cµ6æ´ö&¦V7BÒgV÷C²gV÷C° b33c¶ôRÒgV÷C²gV÷C° VæE6VÆV7@¤VæDgVæ0

I've taken out a lot of includes for ease of posting, but nothing else is relevant. This is just a launcher-GUI. I almost forgot... Place all of these images in a UI directory, i.e. C:\SLB.au3; C:\UI\SLB.jpg:


Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite

Share this post


Link to post
Share on other sites



what is the content of the last include "slb_mainui.au3"?

Share this post


Link to post
Share on other sites

Oh wow, I'm an idiot! Sorry, that was the whole code!

slb_mainui.au3

$GUI = GUICreate("SLB2", 500, 500, -1, -1, $WS_POPUP + $WS_SYSMENU + $WS_MINIMIZEBOX)

$BG = GUICtrlCreatePic("UI\BG.jpg",0,0,500,500)

GUICtrlCreateLabel("",254,220,231,208)
GUICtrlSetBkColor(-1,0x000000)

LoadWebpage(0,"http://slb.joshdb.com/version.html",245,210,273,225)

GUICtrlCreateLabel("",245,210,273,3)
GUICtrlSetBkColor(-1,0x000000)
GUICtrlCreateLabel("",245,210,3,225)
GUICtrlSetBkColor(-1,0x000000)
GUICtrlCreateLabel("",245,432,273,3)
GUICtrlSetBkColor(-1,0x000000)

Global $COWN_E = 0, $WWW_E = 0

RoundGUICorners($GUI)

FadeIn()

While 1
    $Msg = GUIGetMsg()
    
    $MCoords = MouseGetPos()
    
    $WCoords = WinGetPos("SLB2")
    
    $MCoords[0] = $MCoords[0] - $WCoords[0]
    $MCoords[1] = $MCoords[1] - $WCoords[1]
    
    Select
        Case $Msg = $GUI_EVENT_CLOSE
            LoadWebpage(2)
            FadeOut()
            Exit
        Case $MCoords[0] >= 237 And $MCoords[1] >= 459 And $MCoords[0] <= 237 + 222 And $MCoords[1] <= 459 + 15 And $COWN_E = 0
            $COWN = GUICtrlCreatePic("UI\COWN.jpg",237,459,223,16)
            GUICtrlSetStyle(-1,-1,$WS_EX_TRANSPARENT)
            Sleep(100)
            $COWN_E = 1
        Case $MCoords[0] < 237 Or $MCoords[1] < 459 Or $MCoords[0] > 237 + 222 Or $MCoords[1] > 459 + 15 And $COWN_E = 1
            GUICtrlDelete($COWN)
            Sleep(100)
            $COWN_E = 0
        Case $MCoords[0] >= 461 And $MCoords[1] >= 459 And $WWW_E = 0
            $WWW = GUICtrlCreatePic("UI\WWW.jpg",461,459,39,41)
            GUICtrlSetStyle(-1,-1,$WS_EX_TRANSPARENT)
            Sleep(100)
            $WWW_E = 1
        Case $MCoords[0] < 461 Or $MCoords[1] < 459 And $WWW_E = 1
            GUICtrlDelete($WWW)
            Sleep(100)
            $WWW_E = 0
    EndSelect
WEnd

Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite

Share this post


Link to post
Share on other sites

Bump? :D


Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite

Share this post


Link to post
Share on other sites

Bump? :D

Ya know, you are making it a lot harder than you need to for people to help you.

You should take some pride in cutting back your example to the minimum number of lines of code that can still reproduce the problem. I find when I do this I not only make it easier for the devs and others to jump in and help, but I also end solving my own problem in the process more times than not.

I've looked at your post a couple of times and just decided I didn't have the time to invest at the moment and would come back to it if I did... it hasn't happened.

See if you can cut it back and I'm betting you get a much better response.

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

....

See if you can cut it back and I'm betting you get a much better response.

Dale

Dale is right, the code is too large to isolate the problem. To make it worse: the code doesn't crash when I run it on my computer (Windows XPsp1, english , IE60sp1). I tried several beta versions of the AutoIt3.exe: no crash.

Anyhow, I assume the program is not finished: You are defining a GUI in the main script, then adding an Internet Explorer ActiveX control using a local function called LoadWebpage(). However as soon as that function ends, all locally defined variables will be wiped, including your ActiveX control. You will end up with nothing when it returns to the main script.

Can you tell me what operating system you are using and which service pack & language, and the version of the internet explorer (including it's patch level)?

Regards,

-Sven

Share this post


Link to post
Share on other sites

Windows XP SP2, Internet Explorer 6 (no patch knowledge).

For the code, I've said so... If you comment out any LoadWebpage() calls, it's fine.

The error comes up after closing the program, it gives a windows error.


Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite

Share this post


Link to post
Share on other sites

Windows XP SP2, Internet Explorer 6 (no patch knowledge).

For the code, I've said so... If you comment out any LoadWebpage() calls, it's fine.

The error comes up after closing the program, it gives a windows error.

You're still trying to pawn the work off on someone else.

You have a choice. If you want help, just take the time to cut this down to a minimal example with clear instructions on how you reproduce the problem. If you don't care, then leave it the way it is an it will likely sit here unsolved.

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

Nevermind, I figured it out. All you have to do is clear the variables in the parent script.

Thanks for the help ( :


Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite

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  
Followers 0