Jump to content

Two Basic Question


Recommended Posts

First Of all I'm sorry for my bad English.

Hello i am at beginner level .I will ask two question.

1.I have button .I want to navigate to the specified URL by this button.(I click the button then internet explorer will go specified URL )

2.I have a button and three input box .I want to clear this 3 inputbox by this button.

Link to comment
Share on other sites

First Of all I'm sorry for my bad English.

Hello i am at beginner level .I will ask two question.

1.I have button .I want to navigate to the specified URL by this button.(I click the button then internet explorer will go specified URL )

2.I have a button and three input box .I want to clear this 3 inputbox by this button.

Next time add your code .

#include <GUIConstantsEx.au3>


GUICreate ("test", 200,200)
$URL = GuiCtrlCreateButton ("URL", 20,20,100,20)
$Clear = GuiCtrlCreateButton ("Clear", 20,50,100,20)
$Value1 = GUICtrlCreateEdit("Value1", 20 , 80, 100, 20)
$Value2 = GUICtrlCreateEdit("Value2", 20 , 110, 100, 20)
$Value3 = GUICtrlCreateEdit("Value3", 20 , 140, 100, 20)
GUISetSTate ()

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = 0
        Case $msg = $GUI_EVENT_CLOSE 
            Exit
        Case $msg = $URL
            ShellExecute("http://www.google.com")
        Case $msg = $clear
            GUICtrlSetData($Value1 , "" )
            GUICtrlSetData($Value2 , "" )
            GUICtrlSetData($Value3 , "" )
    EndSelect
Wend
Edited by Emiel Wieldraaijer

Best regards,Emiel Wieldraaijer

Link to comment
Share on other sites

Next time add your code .

#include <GUIConstantsEx.au3>


GUICreate ("test", 200,200)
$URL = GuiCtrlCreateButton ("URL", 20,20,100,20)
$Clear = GuiCtrlCreateButton ("Clear", 20,50,100,20)
$Value1 = GUICtrlCreateEdit("Value1", 20 , 80, 100, 20)
$Value2 = GUICtrlCreateEdit("Value2", 20 , 110, 100, 20)
$Value3 = GUICtrlCreateEdit("Value3", 20 , 140, 100, 20)
GUISetSTate ()

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = 0
        Case $msg = $GUI_EVENT_CLOSE 
            Exit
        Case $msg = $URL
            ShellExecute("http://www.google.com")
        Case $msg = $clear
            GUICtrlSetData($Value1 , "" )
            GUICtrlSetData($Value2 , "" )
            GUICtrlSetData($Value3 , "" )
    EndSelect
Wend

vey thx

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