Jump to content
Sign in to follow this  
SUROJ

How do I link Inputbox with Button?

Recommended Posts

SUROJ

I am New in autoit scripting. I am tryinpost-66570-0-14060700-1312650518_thumb.jg to create IE embedded program but I cannot link Input box with button. How do I do it?

Share this post


Link to post
Share on other sites
wakillon

Use GuiCtrlRead for read the InputBox content.like this

#include <GUIConstantsEx.au3>

Global $file, $btn, $msg

GUICreate("", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45 )
$file = GUICtrlCreateInput("", 10, 5, 300, 20)
$btn = GUICtrlCreateButton("Ok", 40, 75, 60, 20)
GUISetState()

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
    $msg = GUIGetMsg()
    Select
        Case $msg = $btn
            _IENavigate ( $oIE, GUICtrlRead($file))
            ExitLoop
    EndSelect
WEnd

What's your script please.Posted Image

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
GEOSoft

Try something along the lines of

_IENavigate ( $oIE, GUICtrlRead($myInput))


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
SUROJ

My script looks like this. It needs corrections.

#include <ButtonConstants.au3>

#include <EditConstants.au3>

#include <GUIConstantsEx.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Form1", 631, 449, 254, 124)

$Input1 = GUICtrlCreateInput("", 56, 64, 241, 21)

$Button1 = GUICtrlCreateButton("Submit", 344, 64, 81, 25, $WS_GROUP)

$Label1 = GUICtrlCreateLabel("Put your url here", 56, 40, 81, 17)

$a =_IECreateEmbedded()

$b = GUICtrlCreateObj($a,30,200,550,400)

GUISetState()

_IENavigate($a,GUICtrlRead($Input1))

While 1

$nMsg = GUIGetMsg()

Case

Select $Button1 = _IENavigate($a,GUICtrlRead($Input1))

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

WEnd

Share this post


Link to post
Share on other sites
wakillon

Try

#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <IE.au3>
#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Form1", 631, 449, 254, 124)
$Input1 = GUICtrlCreateInput("", 56, 64, 241, 21)
$Button1 = GUICtrlCreateButton("Submit", 344, 64, 81, 25, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Put your url here", 56, 40, 81, 17)
$a =_IECreateEmbedded()
$b = GUICtrlCreateObj($a,30,200,550,400)
GUISetState()
_IENavigate($a,GUICtrlRead($Input1))

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $Button1
            _IENavigate($a,GUICtrlRead($Input1))
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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  

×