How to press the refresh button on IE?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
tommytx
Pro Scripter
Posts: 61
Joined: Mon Dec 22, 2003 3:20 am

How to press the refresh button on IE?

Post by tommytx » Fri Apr 01, 2005 5:18 am

I need to LClick on the Refresh button in the IE, and need help.
I can't use the direct position, as the IE will be set to different sizes at times so coordinates wont work. I tried to use the view to get the name of the button as refresh, but PushButton>window name,refresh fails and also MouseOver>window name,refresh also fails.
Can anyone help me out here?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Apr 01, 2005 5:25 am

F5 is the hot key for IE Refresh.

SetFocus>InternetExplorerWindowName*
Press F5

[/quote]
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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

Post by JRL » Fri Apr 01, 2005 5:25 am

Can you use "MouseMoveRel" then "LClick"?

tommytx
Pro Scripter
Posts: 61
Joined: Mon Dec 22, 2003 3:20 am

Post by tommytx » Fri Apr 01, 2005 6:15 am

Thanks Bob, F5 works great for that problem. Is there a list of all the hotkeys for IE somewhere?

JRL Not sure what you mean by "MouseMoveRel" can you give me an example as if there is some way to use the view method to get the names of all the buttons on IE to select them I would also like to know that.
Is Rel for Relative or Release? I presume relative, but what will I move it realative to? An example would be great.
Thanks

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Fri Apr 01, 2005 8:22 am

If you have created an IE ActiveX object in your script then you can do:

IE.Refresh
MJT Net Support
[email protected]

tommytx
Pro Scripter
Posts: 61
Joined: Mon Dec 22, 2003 3:20 am

Post by tommytx » Fri Apr 01, 2005 8:52 am

Thanks, I know how to do the Active X so I will try this.
IE.Refresh

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Apr 01, 2005 3:06 pm

This page on Browser Hot Keys can provide a quick reference for MSIE and FireFox keys
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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

Post by JRL » Fri Apr 01, 2005 3:35 pm

Information for MS functions can be found by opening Macro Scheduler, then selecting "Help" then "Contents" then "Using Macro Scheduler" then "Script Commands".

That said, rereading your initial post, I think Bob had the best solution for you.


In answer to your question.

From The MS help screen for "MouseMoveRel":
MouseMoveRel>X,Y

Moves the mouse cursor to the position X,Y relative to the upper left corner of the window currently in focus. 0,0 will be the upper left hand corner of the active window. Variables containing the coordinates can be used in the command.

The advantage of this command over the MouseMove command, is that this will not fail when the window changes its position or resizes, or if the screen resolution is changed.
Example

If position 40,50 is a point relative to the current window, on a button, the following script would cause that button to be clicked :

MouseMoveRel>40,50
LClick
Hope this was helpful.
Dick

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Apr 01, 2005 4:21 pm

And just a caution re MouseMoveRel> on HTML pages.

MouseMoveRel> usually works very well on most types of windows. But special attention should be paid when using with browsers or other dynamic pages such as those with frames or word wrapping..

Some HTML pages have widths set as a % of window size and as a result they may wrap. That means that some objects will be in different relative postions every time you resize a window. Table cells may become taller now because of wrap-arounds, etc. As Frame dividers are moved, objects and positions will also be moved.

So, first choice would always be to see if you can use keyboard entries vs. mouse moves in your scripts. Check every program's Help section for HotKeys. And note that some HotKeys may be Case Sensitive. So if a HotKey does not work, try the other Case.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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