Jump to content

Is it possible to make tabs ?


Kiesp
 Share

Recommended Posts

Hi there my happy (hopefully) autoit gurus :D

I want to make a program that opens between 3 and 11 internet pages, but that is pretty annoying when 11 windows pops up on the screen.. so i was thinkin.. it is possible to make a GUI with the pages like in tabs ?(if thats the right word(its like windows in the gui))

thanks for reading :D hope u have the answer :)

Edited by Kiesp

http://www.autoitscript.com/forum/index.php?showtopic=69911 <-- Best hacker ever :D

Link to comment
Share on other sites

Modified from help file. :)

; *******************************************************
; Example 1 - Trap COM errors so that 'Back' and 'Forward' 
;               outside of history bounds does not abort script 
;               (expect COM errors to be sent to the console)
; *******************************************************
;
#include <GUIConstants.au3>
#include <IE.au3>

Dim $aryIE[2]
_IEErrorHandlerRegister ()

GUICreate("Embedded Web control Test", 640, 580, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$mainTab = GUICtrlCreateTab(20,20, 600, 500)

GUICtrlCreateTabitem ("tab0")
$aryIE[0] = _IECreateEmbedded ()
GUICtrlCreateObj($aryIE[0], 30, 60, 580, 450)

GUICtrlCreateTabitem ("tab1")
$aryIE[1] = _IECreateEmbedded ()
GUICtrlCreateObj($aryIE[1], 30, 60, 580, 450)
GUICtrlCreateTabitem ("")

$GUI_Button_Back = GUICtrlCreateButton("Back", 20, 540, 100, 30)
$GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 540, 100, 30)
$GUI_Button_Home = GUICtrlCreateButton("Home", 230, 540, 100, 30)
$GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 540, 100, 30)

GUISetState()       ;Show GUI

_IENavigate ($aryIE [0], "http://www.autoitscript.com")
_IENavigate ($aryIE [1], "http://www.google.com")

; Waiting for user to close the window
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $GUI_Button_Home
            ;Add your action
            ;_IENavigate ($oIE[0], "http://www.autoitscript.com")
        Case $msg = $GUI_Button_Back
            ;Add your action
            ;_IEAction ($oIE, "back")
        Case $msg = $GUI_Button_Forward
            ;Add your action
            ;_IEAction ($oIE, "forward")
        Case $msg = $GUI_Button_Stop
            ;Add your action
            ;_IEAction ($oIE, "stop")
    EndSelect
WEnd

GUIDelete()

Exit
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...