2 Internet Explorer in das GUI einbinden

  • Hallo liebe Community,

    ich würde eure Hilfe brauchen...

    Also ich habe das Problem das der erste Browser nicht immer angezeigt wird und ich würde gerne wissen wieso das so is...
    und wenn möglich beheben ;P

    eure klugen Köpfe sind gefragt...

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    $Form1 = GUICreate("BLUB", 625, 465, 640, 280)
    $Button1 = GUICtrlCreateButton("erster Browser", 136, 96, 113, 25, $WS_GROUP)
    $Button2 = GUICtrlCreateButton("zweiter Browser", 256, 96, 113, 25, $WS_GROUP)
    $Button3 = GUICtrlCreateButton("Nichts", 16, 96, 113, 25, $WS_GROUP)
    $Obj1 = ObjCreate("Shell.Explorer.2")
    $Obj1_ctrl = GUICtrlCreateObj($Obj1, 8, 128, 610, 292)
    GUICtrlSetState(-1, $GUI_Hide)
    $Obj2 = ObjCreate("Shell.Explorer.2")
    $Obj2_ctrl = GUICtrlCreateObj($Obj2, 8, 128, 610, 292)
    GUICtrlSetState(-1, $GUI_Hide)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState () ;Show GUI

    [/autoit] [autoit][/autoit] [autoit]

    $Obj1.navigate("http://www.google.at")
    $Obj2.navigate("http://www.autoit.de")

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    Case $Button1

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetState($Button1, $GUI_Disable)
    GUICtrlSetState($Button2, $GUI_Enable)
    GUICtrlSetState($Button3, $GUI_Enable)

    [/autoit] [autoit][/autoit] [autoit]


    GUICtrlSetState($Obj1_ctrl, $GUI_SHOW)
    GUICtrlSetState($Obj2_ctrl, $GUI_HIDE)


    Case $Button2

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetState($Button1, $GUI_Enable)
    GUICtrlSetState($Button2, $GUI_Disable)
    GUICtrlSetState($Button3, $GUI_Enable)

    [/autoit] [autoit][/autoit] [autoit]


    GUICtrlSetState($Obj1_ctrl, $GUI_HIDE)
    GUICtrlSetState($Obj2_ctrl, $GUI_SHOW)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $Button3

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetState($Button1, $GUI_Enable)
    GUICtrlSetState($Button2, $GUI_Enable)
    GUICtrlSetState($Button3, $GUI_Disable)

    [/autoit] [autoit][/autoit] [autoit]


    GUICtrlSetState($Obj1_ctrl, $GUI_HIDE)
    GUICtrlSetState($Obj2_ctrl, $GUI_HIDE)


    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    Danke für eure Bemühungen

    Mit freundlichen Grüßen

    LatroX

    Einmal editiert, zuletzt von LatroX (26. August 2010 um 23:17)

  • also bei mir is es so: wenn ich am Anfang gleich "erster Browser" klick geht der nicht.
    nur wenn ich dann auf "zweiter Browser" klick und dann wieder "erster Browser" geht der.
    oder wenn ich "Nichts" drück und dann "erster Browser" gehts auch net...

    naja vllt kann mir einer helfen...

    wäre echt toll...

  • Es lag an der Reihenfolge, wie du es gemacht hast. Bei einem Klick auf $Button2 lässt du erst $Obj1 erscheinen und dann $Obj2 verschwinden. Das Problem dabei ist dann, wenn $Obj2 gar nicht sichtbar ist. Dann entsteht dieses weiße Rechteck. Wenn du auf den Browser klickst, kannst du ihn wieder sehen.

    So funktioniert es:

    Spoiler anzeigen
    [autoit]


    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    $Form1 = GUICreate("BLUB", 625, 465, 640, 280)
    $Button1 = GUICtrlCreateButton("erster Browser", 136, 96, 113, 25, $WS_GROUP)
    $Button2 = GUICtrlCreateButton("zweiter Browser", 256, 96, 113, 25, $WS_GROUP)
    $Button3 = GUICtrlCreateButton("Nichts", 16, 96, 113, 25, $WS_GROUP)
    $Obj1 = ObjCreate("Shell.Explorer.2")
    $Obj1_ctrl = GUICtrlCreateObj($Obj1, 8, 128, 610, 292)
    GUICtrlSetState(-1, $GUI_Hide)
    $Obj2 = ObjCreate("Shell.Explorer.2")
    $Obj2_ctrl = GUICtrlCreateObj($Obj2, 8, 128, 610, 292)
    GUICtrlSetState(-1, $GUI_Hide)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState() ;Show GUI

    [/autoit] [autoit][/autoit] [autoit]

    $Obj1.navigate("http://www.autoitscript.com")
    $Obj2.navigate("http://www.autoit.de")

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    Case $Button1

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetState($Button1, $GUI_Disable)
    GUICtrlSetState($Button2, $GUI_Enable)
    GUICtrlSetState($Button3, $GUI_Enable)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetState($Obj2_ctrl, $GUI_Hide)
    GUICtrlSetState($Obj1_ctrl, $GUI_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    Case $Button2

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetState($Button1, $GUI_Enable)
    GUICtrlSetState($Button2, $GUI_Disable)
    GUICtrlSetState($Button3, $GUI_Enable)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetState($Obj1_ctrl, $GUI_Hide)
    GUICtrlSetState($Obj2_ctrl, $GUI_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    Case $Button3

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetState($Button1, $GUI_Enable)
    GUICtrlSetState($Button2, $GUI_Enable)
    GUICtrlSetState($Button3, $GUI_Disable)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetState($Obj1_ctrl, $GUI_Hide)
    GUICtrlSetState($Obj2_ctrl, $GUI_Hide)

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd

    [/autoit]
  • FichteFoll: echt FETTES Danke :D das wars...

    so ein kleiner Fehler ^^

    könnt hier dicht machen :P

    Mfg

    LatroX

  • FichteFoll: echt FETTES Danke :D das wars...

    so ein kleiner Fehler ^^

    könnt hier dicht machen :P


    Hier werden nur Threads von Admins/Mods "dicht gemacht" die den Forenregeln widersprechen.
    Du kannst das aber selbst machen, indem du deinen Eröffnungspost bearbeitest, dort den Präfix (nähe Überschrift) auf gelöst stellst und danach speicherst,

    mfg autoBert