oded Posted January 28, 2012 Report Share Posted January 28, 2012 The help for "Web Site" command says: "Use this command to open a web page. Just enter the web site address and click the OK button. The web site entered is launched when the macro is run. If the browser is not open, the macro also opens the browser." I use this command launching certain sites using IE. However the browser is already opened (before the macro is activated) but the macro launches the site opening a new window of IE. Am I missing something? Thanks a lot for any help. Oded. Quote Link to comment Share on other sites More sharing options...
paul Posted January 29, 2012 Report Share Posted January 29, 2012 This is quite odd! My default browser is Firefox, for which the Web SIte command works as expected; if Firefox is not running, this command loads Firefox with the requested page. If Firefox is running, this command simply opens a new tab showing the requested page. But, like you, my experience with IE is quite different. The Web Site command always seems to open a new non-maximized window for IE, even though I have declared my preference for tabs. So I suggest the following code as a workaround: Variable Set String %tUrl% to "www.myhq.com" If Not Program "IEXPLORE.EXE" is running Program Launch: "iexplore.exe" (Normal) Parameters: End If Window Activate: Internet Explorer Text Type (Simulate Keystrokes): <ALT>d Delay: 500 milliseconds Text Type (Simulate Keystrokes): %tUrl%<ENTER> <VARIABLE SET STRING Option="\x00" Destination="%tUrl%" Value="www.myhq.com" NoEmbeddedVars="FALSE"/> <IF NOT PROGRAM Option="\x01" Program="IEXPLORE.EXE"/> <PROGRAM LAUNCH Path="C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe" Mode="\x00" Default_Path="TRUE" Wait="1" Get_Console="FALSE"/> <END IF/> <WINDOW ACTIVATE Title="Internet Explorer" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <TEXT TYPE Action="0" Text="<ALT>d"/> <DELAY Flags="\x02" Time="500"/> <TEXT TYPE Action="0" Text="%tUrl%<ENTER>"/> Quote Link to comment Share on other sites More sharing options...
oded Posted January 29, 2012 Author Report Share Posted January 29, 2012 This is quite odd! My default browser is Firefox, for which the Web SIte command works as expected; if Firefox is not running, this command loads Firefox with the requested page. If Firefox is running, this command simply opens a new tab showing the requested page. But, like you, my experience with IE is quite different. The Web Site command always seems to open a new non-maximized window for IE, even though I have declared my preference for tabs. So I suggest the following code as a workaround: Variable Set String %tUrl% to "www.myhq.com" If Not Program "IEXPLORE.EXE" is running Program Launch: "iexplore.exe" (Normal) Parameters: End If Window Activate: Internet Explorer Text Type (Simulate Keystrokes): <ALT>d Delay: 500 milliseconds Text Type (Simulate Keystrokes): %tUrl%<ENTER> <VARIABLE SET STRING Option="\x00" Destination="%tUrl%" Value="www.myhq.com" NoEmbeddedVars="FALSE"/> <IF NOT PROGRAM Option="\x01" Program="IEXPLORE.EXE"/> <PROGRAM LAUNCH Path="C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe" Mode="\x00" Default_Path="TRUE" Wait="1" Get_Console="FALSE"/> <END IF/> <WINDOW ACTIVATE Title="Internet Explorer" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <TEXT TYPE Action="0" Text="<ALT>d"/> <DELAY Flags="\x02" Time="500"/> <TEXT TYPE Action="0" Text="%tUrl%<ENTER>"/> Paul, I too like Firefox much more than Ie. However ME Pro limits the option "wait for the web page" (which I use a lot) only to IE. I wish Firefox had this option too... Anyways many thanks for your help. Much appreciated. Oded. Quote Link to comment Share on other sites More sharing options...
paul Posted January 30, 2012 Report Share Posted January 30, 2012 However ME Pro limits the option "wait for the web page" (which I use a lot) only to IE. I wish Firefox had this option too... While Firefox is still loading a page, you'll notice that there's an X between and below Edit and View in the menu bar that is not greyed out. I've written a macro called FirefoxLoaded that runs after I've requested a specific URL, and returns control only after this X becomes greyed out, OR after a timeout usng some predefined value (in my case, 120 seconds). FirefoxLoaded checks for a specific pixel value in the centre of the X (this pixel value, together with its exact location, varies according to the graphics card and OS you use, but, once set, is stable). Quote Link to comment Share on other sites More sharing options...
Cory Posted January 30, 2012 Report Share Posted January 30, 2012 Check your IE settings. There is one that will cause new external shortcuts to be launched in a new instance. I believe non-tabbed browsing is more efficient so I use this setting all the time. Quote Link to comment Share on other sites More sharing options...
oded Posted January 30, 2012 Author Report Share Posted January 30, 2012 Check your IE settings. There is one that will cause new external shortcuts to be launched in a new instance. I believe non-tabbed browsing is more efficient so I use this setting all the time. Cory, Where exactly can I find the one you are talking about? Quote Link to comment Share on other sites More sharing options...
Cory Posted January 30, 2012 Report Share Posted January 30, 2012 Internet Options > Advanced tab > Reuse windows for launching shortcuts Quote Link to comment Share on other sites More sharing options...
oded Posted January 31, 2012 Author Report Share Posted January 31, 2012 Internet Options > Advanced tab > Reuse windows for launching shortcuts I have unchecked this setting, restarted computer, but nothing has changed (namely a new IE window is opened every time a macro is run.) Maybe there is another setting I have to change? Thanks, Oded. Quote Link to comment Share on other sites More sharing options...
Cory Posted January 31, 2012 Report Share Posted January 31, 2012 You want it checked if you want to reuse, not uncheck. Now if you're running in tabbed mode then you should also check your tab browsing settings. Internet Options > General tab > Open Links from other programs in: You just need to look around in the IE settings. Also use the help file. Quote Link to comment Share on other sites More sharing options...
paul Posted February 1, 2012 Report Share Posted February 1, 2012 You want it checked if you want to reuse, not uncheck. Now if you're running in tabbed mode then you should also check your tab browsing settings. Internet Options > General tab > Open Links from other programs in: You just need to look around in the IE settings. Also use the help file. Cory, none of these settings makes the slightest difference - I have tried them all. Quote Link to comment Share on other sites More sharing options...
oded Posted February 1, 2012 Author Report Share Posted February 1, 2012 Cory, none of these settings makes the slightest difference - I have tried them all. Me too Quote Link to comment Share on other sites More sharing options...
terrypin Posted February 1, 2012 Report Share Posted February 1, 2012 Cory, none of these settings makes the slightest difference - I have tried them all. I avoid IE unless FF for some reason can't render a page properly, but there seem to be a few posts about this sort of thing. Here's one that may or may not be relevant: http://blogs.msdn.com/b/askie/archive/2009/03/09/opening-a-new-tab-may-launch-a-new-process-with-internet-explorer-8-0.aspx Oded: Don't let ME pro's lack of a Wait feature force you away from FF! I use a pixel-spotting macro to do the equivalent: <DELAY Flags="\x02" Time="200"/> <REPEAT UNTIL Variable="%StopColour%" Condition="\x00" Value="13160660" _COMMENT="Grey, after the red during loading. Theme: Default"/> <GET PIXEL COLOR Option="\x01" Rel_To_Screen="FALSE" X="94" Y="65" Destination="%StopColour%"/> <DELAY Flags="\x02" Time="50"/> <END REPEAT/> <DELAY Flags="\x01" Time="0.1"/> -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Cory Posted February 1, 2012 Report Share Posted February 1, 2012 I don't know what to say. They work for me in IE9. Maybe it's just because I'm not using tabbed browsing. Quote Link to comment Share on other sites More sharing options...
Cory Posted February 1, 2012 Report Share Posted February 1, 2012 OK this was bugging me so I enabled tabbed browsing, checked the advanced option to reuse windows, and set the "Open links from other programs in:" > "A new tab in the current window", and created a test macro to launch bluepointdesign.com. It opened in a new tab of the existing window just as I described. W7-64 and IE9 Perhaps you have some security software that's causing it not to work properly? Quote Link to comment Share on other sites More sharing options...
Samrae Posted February 1, 2012 Report Share Posted February 1, 2012 Could it be a timing thing? The Define Word Take 5 has support for several browsers. The delays used for IE are much longer than those of other browsers. Quote Link to comment Share on other sites More sharing options...
oded Posted February 9, 2012 Author Report Share Posted February 9, 2012 I avoid IE unless FF for some reason can't render a page properly, but there seem to be a few posts about this sort of thing. Here's one that may or may not be relevant: http://blogs.msdn.co...plorer-8-0.aspx Oded: Don't let ME pro's lack of a Wait feature force you away from FF! I use a pixel-spotting macro to do the equivalent: <DELAY Flags="\x02" Time="200"/> <REPEAT UNTIL Variable="%StopColour%" Condition="\x00" Value="13160660" _COMMENT="Grey, after the red during loading. Theme: Default"/> <GET PIXEL COLOR Option="\x01" Rel_To_Screen="FALSE" X="94" Y="65" Destination="%StopColour%"/> <DELAY Flags="\x02" Time="50"/> <END REPEAT/> <DELAY Flags="\x01" Time="0.1"/> -- Terry, East Grinstead, UK Thank you, Terry Quote Link to comment Share on other sites More sharing options...
acantor Posted February 13, 2012 Report Share Posted February 13, 2012 <DELAY Flags="\x02" Time="200"/> <REPEAT UNTIL Variable="%StopColour%" Condition="\x00" Value="13160660" _COMMENT="Grey, after the red during loading. Theme: Default"/> <GET PIXEL COLOR Option="\x01" Rel_To_Screen="FALSE" X="94" Y="65" Destination="%StopColour%"/> <DELAY Flags="\x02" Time="50"/> <END REPEAT/> <DELAY Flags="\x01" Time="0.1"/> Use this code with caution. "Repeat Until <condition>" may cause a freeze if, for some reason, the condition is never met, e.g., another window steals focus. Sometimes it is possible to break out of the loop, and sometimes not. I would avoid using Repeat Until <condition> unless you can include a failsafe mechanism, e.g., a counter that breaks out of the repeat loop after, say, 1000 iterations. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.