Jump to content
Sign in to follow this  
cane

_IENavigate error

Recommended Posts

cane

Ok when i run the script i enter the username and when i click lookup it just searches for 5 instead of the $username variable

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

_IEErrorHandlerRegister ()

$oIE = _IECreateEmbedded ()
GUICreate("Lookup", 640, 580, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360)
$label = GUICtrlCreateLabel("Username", 10, 420, 100, 30)
$username = GUICtrlCreateInput("Forward", 120, 420, 100, 30)
$go = GUICtrlCreateButton("Lookup", 340, 420, 100, 30)

GUISetState()     ;Show GUI

_IENavigate ($oIE, "")

; Waiting for user to close the window
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $label
        Case $msg = $username
            _IEAction ($oIE, "")
        Case $msg = $go
            _IENavigate ($oIE, "http://hiscore.runescape.com/hiscorepersonal.ws?user1=" & $username)
    EndSelect
WEnd

GUIDelete()

Exit

why does it do that?

Thanks for your time.

Share this post


Link to post
Share on other sites
Valuater

The number "5" is the control ID for the input, you need to read the input

replace this line...

_IENavigate ($oIE, "http://hiscore.runescape.com/hiscorepersonal.ws?user1=" & GUICtrlRead($username))

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
cane

The number "5" is the control ID for the input, you need to read the input

replace this line...

_IENavigate ($oIE, "http://hiscore.runescape.com/hiscorepersonal.ws?user1=" & GUICtrlRead($username))

8)

thanks :D

now im going to try and get it to read the page and display the stats in my own way :D i will most likely be back. But thanks for the fast reply

Share this post


Link to post
Share on other sites
Valuater

thanks :D

now im going to try and get it to read the page and display the stats in my own way :D i will most likely be back. But thanks for the fast reply

Welcome

... and Welcome to the Autoit Forums!!!

8)


NEWHeader1.png

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  

×