Jump to content

Website goes white while reloaded in GUI


Regency
 Share

Recommended Posts

So I wrote it and it "works" but the pages get whited out after i hit my "reload" button, see code,

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
$oIE = ObjCreate("Shell.Explorer.2")
$oIE2 = ObjCreate("Shell.Explorer.2")
$T = GUICreate("TMN Status Bar", 870, 250, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_EX_TOPMOST)
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 890, 50)
$GUIActiveX = GUICtrlCreateObj($oIE2, 40, 50, 800, 200)
$Reload = GUICtrlCreateButton("Reload", 0, 50, 40, 30, 0)
GUISetState(@SW_SHOWNOACTIVATE, $T) ;Show GUI
$oIE.navigate("tmnx.net/authenticated/userinfo.aspx")
$oIE2.navigate("tmnx.net/authenticated/rankbar.aspx")


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Reload
            $oIE.navigate("tmnx.net/authenticated/userinfo.aspx")
            $oIE2.navigate("tmnx.net/authenticated/rankbar.aspx")
    EndSwitch

WEnd

GUIDelete()

First image where there is no white bar at top is how it looks normally when first open, then after i hit my "reload" button, the script makes the top and or the bottom white, its still there, i can highlight it, but its white.. anyone got any ides why and or a fix?

post-28129-12553920279666_thumb.png

post-28129-1255392037436_thumb.png

Link to comment
Share on other sites

$T = GUICreate("TMN Status Bar", 870, 250, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_VISIBLE, $WS_CLIPSIBLINGS), $WS_EX_TOPMOST)

Summing and ORing usually results in the expected behavior but 0x101 + 0x001 (0x110 = 6) is not the same as BitOR(0x101, 0x001) (0x101 = 5). Also the $WS_EX_TOPMOST flag should go to the extended parameter of the function. Hope it solves the problem.

Link to comment
Share on other sites

1st... Notice

$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_EX_TOPMOST

The $WS_EX... is typically for the "extended" style

2nd... If you wrote that code, you should understand most of what he said

3rd... Sometimes I just "do what he says" cause it works. Then I can go on to the next problem

8)

NEWHeader1.png

Link to comment
Share on other sites

I did write this, but i had help from someone who helped me work out how to create a ie window within a gui. so i am working with what i understood from when we create it.

So when i took out the $WS_EX_TOPMOST, i got a error and it wouldnt load..

>Running:(3.3.0.0):C:\Program Files\AutoIt3\autoit3.exe "D:\TMN\userbar 1.5.au3"    
C:\Program Files\AutoIt3\Include\IE.au3 (1150) : ==> The requested action with this object has failed.:
SetExtended($oTemp.images.length)
SetExtended($oTemp.images^ ERROR
->20:42:06 AutoIT3.exe ended.rc:1
+>20:42:07 AutoIt3Wrapper Finished
>Exit code: 1    Time: 1.968

I dunno what to do, i am trying to understand how and why he wrote it this way, and when we worked on it, it was about 3 months ago. I am sorry i dont know alot, but the person who helped knew what he was doing and gave me a head start..

Link to comment
Share on other sites

I think that this error has nothing to do with the extended style. $WS_EX_TOPMOST is an extended style value so it should go to the parameter that expects it. Read the GUICreate() function description. Also, read the _IECreateEmbedded() function description and remarks, this object doesn't support what internetexplorer.application support, so it might be the case.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...