Navigating to a URL stored on the Clipboard

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
fightcancer
Macro Veteran
Posts: 260
Joined: Fri Apr 15, 2005 8:32 am

Navigating to a URL stored on the Clipboard

Post by fightcancer » Tue Aug 30, 2005 7:11 pm

MS 7.3.11.4e

I'm trying to write some code for a webpage. Since it's not possible to use the "IE.Busy" property on an existing IE window (without using VBRun>CreateIE first), I'm trying to write a work-around. The work-around copies the URL of the existing IE window, closes that window, and then navigates to that URL in the newly created IE window (using VBRun>CreateIE). So the URL is stored on the clipboard.

I'm having trouble with this portion of the code.

GetClipBoard>WhatsInTheClipBoard
VBRun>Navigate,%WhatsInTheClipBoard%
VBRun>WaitBusy


The new IE window (created using VBRun>CreateIE) navigates to the exact URL: "%WhatsInTheClipboard%". Of course, I want it to navigate to the URL of the previous IE window. Any suggestions on my dilemma would be appreciated.

TIA!

fightcancer
Macro Veteran
Posts: 260
Joined: Fri Apr 15, 2005 8:32 am

Post by fightcancer » Wed Aug 31, 2005 4:34 pm

FYI, this issue seems to have been solved by adding a line:

Wait>0.05

between the Send>C and Send>W lines. I believe the problem was that the code was moving so fast that nothing was actually copied to the clipboard.

Now the code looks like this and it seems to work perfectly.

Press CTRL
Send>C
WAIT>0.05
Send>W
Release CTRL

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