Jump to content

URL Code


Recommended Posts

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]

Link to comment
Share on other sites

  • Moderators

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
Link to comment
Share on other sites

  • Moderators

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.
Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

http://www.autoitscript.com/forum/index.ph...st&p=138028

something to look at from what the original question that was asked.

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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