Capture adress in bar of Win Internet Explorer

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
PepsiHog
Automation Wizard
Posts: 511
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

Capture adress in bar of Win Internet Explorer

Post by PepsiHog » Sat Jul 03, 2010 7:56 pm

Hello,

MS v11

I am tring to capture the text in the address bar of Windows Internet Explorer 8.
I have been attempting to use GetTextInRec with no success.

I know I could automate it with findimagepos, but I would like to avoid that if possible. Something more direct is prefered.

And, If anyone knows how to calc the coordinates for GetTextInRec, will you please explain how? I tried using "Follow Cursor" , but it never seems to work.

Thanks,
PepsiHog
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2021) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Sat Jul 03, 2010 8:07 pm

What I do is highlight the text with the mouse cursor and send the keystrokes of Ctrl-c to copy the text to the clipboard.



i.e.

MouseMoveRel>x,y
LClick
Wait>0.5
Press Ctrl
Send>c
Release Ctrl
Wait>0.5
GetClipBoard>result

User avatar
PepsiHog
Automation Wizard
Posts: 511
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

Post by PepsiHog » Sat Jul 03, 2010 8:15 pm

Thanks. Yeah, I did that for other things. Great idea. However, I am attempting to have less automation. The less, the better.

I don't know if you understand that, but I'm wierd. Plus, trying new things.

But thanks! Do you have any other ideas?
PepsiHog
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2021) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Sat Jul 03, 2010 9:14 pm

Script the IE object using VBScript. Then you can get at the address bar directly as a property of the object.

There are plenty of existing examples in the forum and scripts and tips archive for IE object scripting already.

I didn't mention this at first because it is a lot more work than simply using copy/paste and the clipboard.

User avatar
PepsiHog
Automation Wizard
Posts: 511
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

VBS

Post by PepsiHog » Sat Jul 03, 2010 11:21 pm

That is a really GREAT idea! And just what I need.

Just one question.

Do you know how to do that? I don't know VBS. But I sure would appreciate it if you could help me out with that idea. :D

I wll search the forum, but if someone happens to know this or knows where to find an example, please post.

I'm writting an actual program. Automation seems slopy. I LOVE automation. But sometimes you just don't want to go that route.

Thanks,
PepsiHog
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2021) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

hagchr
Automation Wizard
Posts: 327
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

Capture adress in bar of Win Internet Explorer

Post by hagchr » Mon Jul 05, 2010 8:06 am

Maybe you can use the shortcut ALT+D to select the address bar, ie.

Press ALT
SendText>D
Release ALT

Then copy to clipboard etc.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts