Open Web page and find position on screen

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
MyQuestions
Newbie
Posts: 2
Joined: Mon Oct 26, 2015 6:15 am

Open Web page and find position on screen

Post by MyQuestions » Mon Oct 26, 2015 6:24 am

I'm really new, and coming from Macro Express. I've been trying to figure out two basic things:

1. How do you open a Web page. I tried opening Firefox, waiting for it to open then doing an http call, like the following, but it only opens Firefox, and doesn't call the web page

RunProgram>C:\Program Files (x86)\Mozilla Firefox\firefox.exe
WaitWindowOpen>firefox.exe
HTTPRequest>http://finance.yahoo.com,,,,strHTML,,,,

2. I though I'd try to click in the address bar and send the keystrokes, but I can't figure out how you determine the position of the address box so you can click into it. Maybe I'm spoiled by the Macro Express live finder, where as you move the mouse around it tells you what the coordinates are, but how do I find the coordinates of a location on the screen where I want to click?

Thanks

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Re: Open Web page and find position on screen

Post by armsys » Mon Oct 26, 2015 7:13 am

Please try:

Code: Select all

Run>C:\Program Files (x86)\Mozilla Firefox\firefox.exe
WaitWindowOpen>Mozilla Firefox*
Wait>1
Press CTRL
Send>l
Release CTRL
Wait>0.2
Send>http://finance.yahoo.com
Press ENTER

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Open Web page and find position on screen

Post by JRL » Mon Oct 26, 2015 4:04 pm

MyQuestions wrote:2. I though I'd try to click in the address bar and send the keystrokes, but I can't figure out how you determine the position of the address box so you can click into it. Maybe I'm spoiled by the Macro Express live finder, where as you move the mouse around it tells you what the coordinates are, but how do I find the coordinates of a location on the screen where I want to click?
When you are in the script editor look to the right side of the icons in the window header. As you move your mouse you will see coordinates changing there. By default those coordinates are the position of the mouse on the screen. to the left of the coordinates there is a drop-down arrow. Pick the arrow and you will see menu items: Relative, Follow Cursor and Pixel Color. If you choose "Follow Cursor" the screen coordinates will appear beside the cursor as you move the mouse around. If you press both mouse buttons simultaneously the mouse coordinates will be placed in the clipboard so you can paste them into your script.

MyQuestions
Newbie
Posts: 2
Joined: Mon Oct 26, 2015 6:15 am

Re: Open Web page and find position on screen

Post by MyQuestions » Mon Oct 26, 2015 8:35 pm

Thank you for both answers. Perhaps as I learn I will be able to contribute to helping others, but that is a long way off yet.

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