Jump to content
Sign in to follow this  
Golbez

open website inside a tab?

Recommended Posts

Golbez

i was just wondering how to open a website inside a tab on my gui. i cant seem to find any other posts atm on what im trying to do. this is my attempt:

#include <IE.au3>
#include <Word.au3>
#include <File.au3>
#include <Date.au3>
#include <GUIbutton.au3>
#include <GUIConstants.au3>
#include <editconstants.au3>
#include <GUIConstantsEx.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <GUIedit.au3>
#include <CompInfo.Au3>
#include <ComboConstants.au3>
#include <StaticConstants.au3>
#include <ButtonConstants.au3>
#include <ProgressConstants.au3>

Global $site = "http://www.google.com/"

Opt("GUIOnEventMode", 1) ;0=disabled, 1=OnEvent mode enabled
Opt("TrayAutoPause", 1) ;0=no pause, 1=Pause
Opt("TrayIconDebug", 0) ;0=no info, 1=debug line info
Opt("TrayIconHide", 0) ;0=show, 1=hide tray icon
Opt("TrayMenuMode", 0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID not return
Opt("TrayOnEventMode", 0) ;0=disable, 1=enable
Opt("GUICloseOnESC", 1) ;1=ESC closes, 0=ESC won't close
Opt("GUICoordMode", 1) ;1=absolute, 0=relative, 2=cell
Opt("GUIDataSeparatorChar", "|") ;"|" is the default
Opt("GUIResizeMode", 0) ;0=no resizing, <1024 special resizing
Opt("GUIEventOptions", 0) ;0=default, 1=just notification, 2=GuiCtrlRead tab index

_IEErrorHandlerRegister ()
$oIE = _IECreateEmbedded ()
$Gui = GUICreate("Gui", 625, 437, 190, 122)
$File = GUICtrlCreateMenu("&File")
$exitbut = GUICtrlCreateMenuItem("Exit", $File)
GUICtrlSetOnEvent(-1, "Terminate")
GUICtrlSetTip(-1, "Stops the Clicker.")
$MenuItem1 = GUICtrlCreateMenu("Edit")
$savebutton = GUICtrlCreateMenuItem("Save", $MenuItem1)
$MenuItem6 = GUICtrlCreateMenu("Popout")
$popsettings = GUICtrlCreateMenuItem("Open Settings", $MenuItem6)
GUICtrlSetOnEvent(-1, "popset")
GUICtrlSetTip(-1, "Stops the Clicker.")
$popweb = GUICtrlCreateMenuItem("Open Website", $MenuItem6)
GUICtrlSetOnEvent(-1, "OpenFourm")
$popmessage = GUICtrlCreateMenuItem("Open Message", $MenuItem6)
$popmemlist = GUICtrlCreateMenuItem("Open Member list", $MenuItem6)
$MenuItem3 = GUICtrlCreateMenu("Help")
$about = GUICtrlCreateMenuItem("About", $MenuItem3)
$Tab1 = GUICtrlCreateTab(8, 8, 609, 401)
$TabSite = GUICtrlCreateTabItem("Site")
$oIEstart1 = ObjCreate("Shell.Explorer.2")
$GUIActiveXstart1 = GUICtrlCreateObj($oIEstart1, 13, 35, 597, 370)
$oIEstart1.navigate($site)
GUICtrlSetState(-1,$GUI_SHOW)
$TabMessage = GUICtrlCreateTabItem("Message")
$TabMembers = GUICtrlCreateTabItem("Members")
$TabSettings = GUICtrlCreateTabItem("Settings")

GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate", $Gui)


While 1
Sleep(100)
WEnd

Func popset()
;FileOpen("Settings.ini",2)
$file = FileOpen("test.txt", 10) ; which is similar to 2 + 8 (erase + create dir)
If $file = -1 Then MsgBox(0, "Error", "Unable to open file.")
EndFunc

Func _save($file, $inifound)
If $inifound = 0 Then
$file = $file & ".prf"
EndIf
;IniWrite($file, "Case Number", "Case Number", GUICtrlRead($casenum))
;IniWrite($file, "Date of Viewing", "Date of Viewing", GUICtrlRead($Date))
_load($file)
EndFunc ;==>_save

Func _load($file)

;GUICtrlSetData($casenum, IniRead($file, "Case Number", "Case Number", "Error reading."))
EndFunc ;==>_load

Func OpenFourm()
_IECreate ($site)
EndFunc

Func _error()
MsgBox("", "ERROR", "ERROR: EDITED SPECIAL WRONG")
Terminate()
EndFunc

Func Terminate()
Exit 0
EndFunc

edit: i figured it out :P

Edited by Golbez

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  

×