Sign in to follow this  
Followers 0
JavaScript_Freek

URL Code

11 posts in this topic

Does anyone know the code where you enter the url in a input box and a iFrame will appear below of the url given?

Thanks. :whistle:


[center]Cookyx.com :: Simple LAN Chat[/center]

Share this post


Link to post
Share on other sites



Does anyone know the code where you enter the url in a input box and a iFrame will appear below of the url given?

Thanks. :whistle:

If I better understood what you were asking I might be able to help.

Share this post


Link to post
Share on other sites

If I better understood what you were asking I might be able to help.

Alright so you see a input box that says uptop: Please type a url:

Then for example you type... www.google.com

the below is white screen but when you hit enter it goes to www.google.com and the url address bar is google.com


[center]Cookyx.com :: Simple LAN Chat[/center]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Something like this?

#include <GUIConstants.au3>
#include <IE.au3>

Dim $sURL = "http://sodaplay.com/constructor/player.htm"

_IEErrorHandlerRegister()

$oIE = _IECreateEmbedded()
GUICreate("Embedded Web control Test", 640, 580, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$GUI_Input = GUICtrlCreateInput("", 10, 10, 540)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360)
$GUI_Button_Go = GUICtrlCreateButton("Go", 560, 10, 50, 20, $BS_DEFPUSHBUTTON)
$GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30)
$GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30)
$GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30)
$GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30)

GUISetState()       ;Show GUI

_IENavigate($oIE, $sURL)

; Waiting for user to close the window
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $GUI_Button_Home
            _IENavigate($oIE, $sURL)
        Case $GUI_Button_Back
            _IEAction($oIE, "back")
        Case $GUI_Button_Forward
            _IEAction($oIE, "forward")
        Case $GUI_Button_Stop
            _IEAction($oIE, "stop")
        Case $GUI_Button_Go
            $sUsername = GUICtrlRead($GUI_Input)
            _IENavigate($oIE, $sURL & "?&getmodel=" & $sUsername) 
    EndSwitch
WEnd

GUIDelete()

Exit

Edit: Updated code

Edited by big_daddy

Share this post


Link to post
Share on other sites

Nope.

I saved it as IE.au3 at the top cause it said IE.au3

then nothing came up.

Where can i get:

#include <GUIConstants.au3>

#include <IE.au3>


[center]Cookyx.com :: Simple LAN Chat[/center]

Share this post


Link to post
Share on other sites

Nope.

I saved it as IE.au3 at the top cause it said IE.au3

then nothing came up.

Where can i get:

#include <GUIConstants.au3>

#include <IE.au3>

Those are both UDF's that are included in the latest beta release (see my signature for download link). Install the beta version, then in SciTE use Alt+F5 or Tools-->Beta Run to run the script.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I got it!

Do you know a code that is like the URL one

But let's say you want to have it like this.

http://sodaplay.com/constructor/player.htm?&getmodel= [ ]

The [ ]is a input box.

So if you type in the in Javascript_Freek

The url would load as.

http://sodaplay.com/constructor/player.htm...JavascriptFreek

PS- Thank you so much big daddy! =)

Edited by JavaScript_Freek

[center]Cookyx.com :: Simple LAN Chat[/center]

Share this post


Link to post
Share on other sites

look at the operator '&'


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

You should really try to explain yourself better. We can't read your mind and you wasn't giving us anything to go on.

Anyway, try the updated code above.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

look at the operator '&'

Thanks Big Daddy!

Whoa. This is like laggy! :whistle:

Alright I don't get it.

This is my code

#include <GUIConstants.au3>
#include <IE.au3>

Dim $sURL = "http://sodaplay.com/constructor/beta/applet.htm?"

_IEErrorHandlerRegister()

$oIE = _IECreateEmbedded()
GUICreate("Embedded Web control Test", 640, 580, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$GUI_Input = GUICtrlCreateInput("", 10, 10, 540)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360)
$GUI_Button_Go = GUICtrlCreateButton("Go", 560, 10, 50, 20, $BS_DEFPUSHBUTTON)
$GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30)
$GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30)
$GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30)
$GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30)

GUISetState()       ;Show GUI

_IENavigate($oIE, $sURL)

; Waiting for user to close the window
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $GUI_Button_Home
            _IENavigate($oIE, $sURL)
        Case $GUI_Button_Back
            _IEAction($oIE, "back")
        Case $GUI_Button_Forward
            _IEAction($oIE, "forward")
        Case $GUI_Button_Stop
            _IEAction($oIE, "stop")
        Case $GUI_Button_Go
            $sUsername = GUICtrlRead($GUI_Input)
            _IENavigate($oIE, $sURL & "&getmodel=" & $sUsername)
    EndSwitch
WEnd

GUIDelete()

Exit

Now when I go to like another window and back it freezez.

Also can you pinpoint out the numbers that i have to edit to change the iFrame and the whole application window

Edited by JavaScript_Freek

[center]Cookyx.com :: Simple LAN Chat[/center]

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  
Followers 0