Jump to content
tommytx

How to control the value in the Address Bar via Autoit"

Recommended Posts

Seem to have a problem training autoit.. to control the Address Bar..
 

; Question how to easily write to the Address bar...

; This will type the new user name into the input box on the site..
$username = "tommytx"
$tomboy = _IEGetObjById ($oIE, "ctl00_SampleContent_ctlLogin_UserName")
$tomboy.value=$username

; This will grab the URL from the address bar line...
Local $oIE = _IECreate("https://www.onewebsite.com")
$cur_url = _IEPropertyGet($oIE, "locationurl")
Msgbox(0,"",$cur_url)

; But what I am looking to do is type a new name into the location bar of the site.
$new_url = "https://www.anotherwebsite.com"
$cur_url =  _IEPropertyGet($oIE, "locationurl")
$cur_url.value=$new_url  ; does not work


; Folowing is the error generated..
; "C:\___BRUCE_EXPORT_MYSQL\Update-Premium\attach.au3" (10) : ==> Variable must be of type "Object".:
; $cur_url.value=$new_url
; $cur_url^ ERROR
; Exit code: 1    Time: 10.98

Appreciate any help toward getting me back on the track. Thanks

 

 

Share this post


Link to post
Share on other sites

Why would you want to hide current url of web site ?  Seems quite suspicious at first sight...

Share this post


Link to post
Share on other sites

I did not post my phone number and SSN either. its just a matter of trying to stay safe from all the idiots on the web with their spam and attacks.. Have you heard of the folks that attack your site for fun... This is a very simple question and can be tested on any site... but since its apparently needed.. have fun.. its vahud.com... just an old test site..
or was that a serious question did you really need to test t hat on a specific site.. if so I apologize... of course if it works. I did test it on 3 different random sites... and if I am working on a customer site.. I certainly do not spread thier domain name all over the web... for their privacy unless its actually needed to solve the problem.

 

 

 

 

Edited by tommytx

Share this post


Link to post
Share on other sites
1 hour ago, tommytx said:

But what I am looking to do is type a new name into the location bar of the site.

Are you trying to change the URL in the address bar without navigating to this new URL?  Or are you just trying to change the URL in the address bar in order to go to the new address?  How you could go about it depends on what you're ultimately trying to do.

Edited by TheXman

Share this post


Link to post
Share on other sites

Thanks for your response TheXman... I am aware that I could simply Navigate to the site... by I simply dumping in a new URL then visit the site..

Its a simple matter to click the left end of Address Bar.. and then Send the URL and follow with an enter and off it goes and that is what I have been doing but having recently come back across the get the locationURL seems like it wold be so much simpler to just send the new url back as a locationURL... so I apparently have assumed that id i can read a value form the page i can write a valulue to that same page...
But not knowing how to get it by id it may not be something that can be done..  but I was sure that one of you experts would immediately know how to do it.. or simply quickly tell me can't be done.. and if so I just continue to click and dump... puts it in the address bar but a little messy..
I also have used click and drag to grab hilite the url.. then delete it  and simply send followed by an enter to make it navigate to the new location.

So bottom line is it possible to write the address bar as simple as we can read the address bar... Thanks for looking at this..




 

Edited by tommytx

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...