Jump to content

Recommended Posts

Posted (edited)

hey realy lost on this one. iv tried a few different ways

but i cant get it right  im trying to get a my internet website into editbox to view only in the edit box but it just wont do it.

 

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\masen\Desktop\HQHQ.kxf
$Form1_1 = GUICreate("Form1", 855, 417, 192, 124)
$hqnews = GUICtrlCreateEdit("", -8, -8, 849, 401)
GUICtrlSetData(-1, "hqnews")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

    EndSwitch
WEnd

 

Edited by Masen
Posted

You can write the HTML or the Text from your website to the EditBox but you can't just load a web page into the EditBox, you need to use GUICtrlCreateObj, what are you trying to achieve exactly?

Posted

As mentioned not sure why you can't use _IECreateEmbedded example i.e. change URL to http://hqnews.org assuming this is the webpage you're referring to.

; 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 <GUIConstantsEx.au3>
#include <IE.au3>
#include <WindowsConstants.au3>

Local $oIE = _IECreateEmbedded()
GUICreate("Embedded Web control Test", 1280, 580, _
        (@DesktopWidth - 1280) / 2, (@DesktopHeight - 580) / 2, _
        $WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
GUICtrlCreateObj($oIE, 10, 40, 1260, 360)
Local $idButton_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30)
Local $idButton_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30)
Local $idButton_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30)
Local $idButton_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30)

Global $g_idError_Message = GUICtrlCreateLabel("", 100, 500, 500, 30)
GUICtrlSetColor(-1, 0xff0000)

GUISetState(@SW_SHOW) ;Show GUI

_IENavigate($oIE, "http://hqnews.org/")
_IEAction($oIE, "stop")

; Waiting for user to close the window
While 1
    Local $iMsg = GUIGetMsg()
    Select
        Case $iMsg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $iMsg = $idButton_Home
            _IENavigate($oIE, "http://hqnews.org/")
            _IEAction($oIE, "stop")
            _IEAction($oIE, "back")
            CheckError("Home", @error, @extended)
        Case $iMsg = $idButton_Back
            _IEAction($oIE, "back")
            CheckError("Back", @error, @extended)
        Case $iMsg = $idButton_Forward
            _IEAction($oIE, "forward")
            CheckError("Forward", @error, @extended)
        Case $iMsg = $idButton_Stop
            _IEAction($oIE, "stop")
            CheckError("Stop", @error, @extended)
    EndSelect
WEnd

GUIDelete()

Exit

Func CheckError($sMsg, $iError, $iExtended)
    If $iError Then
        $sMsg = "Error using " & $sMsg & " button (" & $iExtended & ")"
    Else
        $sMsg = ""
    EndIf
    GUICtrlSetData($g_idError_Message, $sMsg)
EndFunc   ;==>CheckError

 

Posted (edited)

ok maby this will help more on giving u more of an idea what im trying to do

im trying to put my website into the hqnews

the site is masen.boards.net

 

maby its possible to put a form into a form??

 

 

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>


#Region ### START Koda GUI section ### Form=c:\users\masen\desktop\hq.kxf
$Form1_1 = GUICreate("Form1", 1200, 662, 192, 124)
$pcmonitor = GUICtrlCreateEdit("", 16, 0, 241, 129)
GUICtrlSetData(-1, "pcmonitor")
$networkmonitor = GUICtrlCreateEdit("", 256, 0, 273, 129)
GUICtrlSetData(-1, "networkmonitor")


$hqnews = GUICtrlCreateEdit ("", 312, 152, 849, 401)

GUICtrlSetData(-1, "hqnews")


$hqweather = GUICtrlCreateEdit("", 16, 152, 281, 201)
GUICtrlSetData(-1, "hqweather")
$hqhoroscope = GUICtrlCreateEdit("", 16, 360, 281, 201)
GUICtrlSetData(-1, "hqhoroscope")
$hqtime = GUICtrlCreateEdit("", 968, 0, 209, 129)
GUICtrlSetData(-1, "hqtime")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###







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

    EndSwitch
WEnd

 

Edited by Masen
Posted (edited)

Bump

 

maby this will be a better way of explaining it?

i am trying to create a form with a Web page spot in the middle of this form

and with surrounding of this web page there is buttons, pictures, and a few other gadget.

and im trying to figure out on how to put the web page script in the middle of this form with all the extras around it instead of having 2 forms or multiple forms.

having all these forms popping up can get out of control.

 


 

Edited by Masen
Posted

thx guys for your guys help. you guys are completely right. apparently i just need more sleep and slow down on writing. hahah thx again

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
  • Recently Browsing   0 members

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