Jump to content

put and run web adres


waldi
 Share

Recommended Posts

Hello,

As it is possible to make GUI with window with button and where it is possible to insert web adres like: www.google.com, yahoo.com, Etc., and when I click the button script open new window IE browser and will make something like:

#include
$oIE = _IECreate ("http://www.google.com")
$oForm = _IEFormGetObjByName ($oIE, "f")
$oQuery = _IEFormElementGetObjByName ($oForm, "q")
_IEFormElementSetValue ($oQuery, "fast cars")
_IEFormSubmit ($oForm, 0)
_IELoadWait($oIE)

thx for help:) and sorry for my english

Link to comment
Share on other sites

I wrote this here, and its untested:

#NoTrayIcon
#Include <IE.au3>

$GUI = GUICreate("URL Launcher", 500, 100)
$Input = GUICtrlCreateInput("", 0, 0)
$Button = GUICtrlCreateButton("Launch", 0, 30)
GUISetState(@SW_SHOW, $GUI)

While 1
       Switch GUIGetMsg()
                Case - 3
                       Exit
                Case $Button
                       $IE = _IECreate(GUICtrlRead($Input))
                       $Form = _IEFormGetObjByName ($IE, "f")
                       $Query = _IEFormElementGetObjByName ($Form, "q")
                       _IEFormElementSetValue ($Query, "fast cars")
                       _IEFormSubmit ($Form, 0)
                       _IELoadWait($IE)
                       GUICtrlSetData($Input, "")
      EndSwitch
WEnd
Edited by JustinReno
Link to comment
Share on other sites

Hello,

As it is possible to make GUI with window with button and where it is possible to insert web adres like: www.google.com, yahoo.com, Etc.,

Id be interested in doing something similar, but with firefox.... any suggestions greatly appreciated,

SI

Perilous to all of us are the devices of an art deeper than we ourselves possess.

Link to comment
Share on other sites

I wrote this here, and its untested:

#NoTrayIcon
#Include <IE.au3>

$GUI = GUICreate("URL Launcher", 500, 100)
$Input = GUICtrlCreateInput("", 0, 0)
$Button = GUICtrlCreateButton("Launch", 0, 30)
GUISetState(@SW_SHOW, $GUI)

While 1
       Switch GUIGetMsg()
                Case - 3
                       Exit
                Case $Button
                       $IE = _IECreate(GUICtrlRead($Input))
                       $Form = _IEFormGetObjByName ($IE, "f")
                       $Query = _IEFormElementGetObjByName ($Form, "q")
                       _IEFormElementSetValue ($Query, "fast cars")
                       _IEFormSubmit ($Form, 0)
                       _IELoadWait($IE)
                       GUICtrlSetData($Input, "")
      EndSwitch
WEnd

It works, nice.

But why is it Case - 3?

Link to comment
Share on other sites

  • 3 weeks later...

hi, again :)

I try realize next step in my script, but I don`t have any idea :) how to do it.

when I click button, is ok, but how to modified this script to automatic click at the user time, where I paste my web adress and time like 10:25:11 where 10 -h, 25-m, 11-s, and script click at this time, how the script get the time? - from windows clock?

Do there be possible ?

Link to comment
Share on other sites

  • 10 months later...

I wrote this here, and its untested:

#NoTrayIcon
#Include <IE.au3>

$GUI = GUICreate("URL Launcher", 500, 100)
$Input = GUICtrlCreateInput("", 0, 0)
$Button = GUICtrlCreateButton("Launch", 0, 30)
GUISetState(@SW_SHOW, $GUI)

While 1
       Switch GUIGetMsg()
                Case - 3
                       Exit
                Case $Button
                       $IE = _IECreate(GUICtrlRead($Input))
                       $Form = _IEFormGetObjByName ($IE, "f")
                       $Query = _IEFormElementGetObjByName ($Form, "q")
                       _IEFormElementSetValue ($Query, "fast cars")
                       _IEFormSubmit ($Form, 0)
                       _IELoadWait($IE)
                       GUICtrlSetData($Input, "")
      EndSwitch
WEndoÝ÷ Ûú®¢×êÞÆjȯ²=«­¢+Ø9½QÉå%½¸(%¹±Õ±Ðí%¹ÔÌÐì((ÀÌØíU$ôU%
ÉÑ ÅÕ½ÐíUI01Õ¹¡ÈÅÕ½Ðì°ÔÀÀ°ÄÀÀ¤(ÀÌØí%¹ÁÕÐôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°À°À¤(ÀÌØí   ÕÑѽ¸ôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí1Õ¹ ÅÕ½Ðì°À°ÌÀ¤)U%MÑMÑÑ¡M]}M!=°ÀÌØíU$¤()]¡¥±Ä(MÝ¥Ñ U%Ñ5Í ¤(
Í´Ì(á¥Ð(
ÍÀÌØí  ÕÑѽ¸(M¡±±áÕÑ ÀÌØí   ÕÑѽ¸¤(¹MÝ¥Ñ )]¹
Link to comment
Share on other sites

Hello,

As it is possible to make GUI with window with button and where it is possible to insert web adres like: www.google.com, yahoo.com, Etc., and when I click the button script open new window IE browser and will make something like:

#include
$oIE = _IECreate ("http://www.google.com")
$oForm = _IEFormGetObjByName ($oIE, "f")
$oQuery = _IEFormElementGetObjByName ($oForm, "q")
_IEFormElementSetValue ($oQuery, "fast cars")
_IEFormSubmit ($oForm, 0)
_IELoadWait($oIE)

thx for help:) and sorry for my english

Sorry, I am just a curious newbie reading topics out of my league... may I ask, what does this do?

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