Opening a minimized iexplorer process with multiple tabs

DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
So today I was working on scripting my logon process. It opens up 4 applications, and then goes into opening web browsers. I had a heck of a time trying to get the web browsers to open in multiple tabs but I finally got it. Now I want those windows to open minimized.

The command I run is:

wscript.exe "c:\documents and settings\%username%\two.js"

the contents of two.js are:

var navOpenInBackgroundTab = 0x1000;
var oIE = new ActiveXObject("InternetExplorer.Application");
oIE.Navigate2(www.yahoo.com);
oIE.Navigate2(www.google.com, navOpenInBackgroundTab);
oIE.Visible = true;

If someone could tell me how to modify this script, that would be awesome. I am also open to other suggestions.

Thanks in advance
Decide what to be and go be it.

Comments

  • sambuca69sambuca69 Member Posts: 262
    oIE.height = "10";

    I think that should do it. You need quotes around the URLs too I think


    *edit*
    Actually, I just did of copy/paste of what you wrote and it opens up minimized for me.

    *edit2*
    So, I see it just remembered the history of my last IE window size. Once I maximized IE and then closed it, the script open the windows maximized. Not sure how you'd set this.
  • DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    sambuca69 wrote: »
    oIE.height = "10";

    I think that should do it. You need quotes around the URLs too I think


    *edit*
    Actually, I just did of copy/paste of what you wrote and it opens up minimized for me.

    *edit2*
    So, I see it just remembered the history of my last IE window size. Once I maximized IE and then closed it, the script open the windows maximized. Not sure how you'd set this.

    I'll have to give it a try tomorrow. Thanks for the reply. I will let you know how it goes.

    Is there a good book to teach scripting like this? Just wondering, I don't do much but when I do I find that it can be quite entertaining.
    Decide what to be and go be it.
  • DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    Your addition opens the browser, and makes it the active window, just makes it smaller.

    When I say minimized, I mean I want it to show up on the task bar, but not on the screen. I don't even know that it is possible, just wondering.

    Thanks for the try though.
    Decide what to be and go be it.
  • sambuca69sambuca69 Member Posts: 262
    Devilsbane wrote: »
    Your addition opens the browser, and makes it the active window, just makes it smaller.

    When I say minimized, I mean I want it to show up on the task bar, but not on the screen. I don't even know that it is possible, just wondering.

    Thanks for the try though.

    I know what you meant. It opened on the taskbar for me the very first time I ran the script.. Once I changed the IE window size however, I could never get it to go back to the taskbar. Must be a setting elsewhere, but I have no idea where to look.
Sign In or Register to comment.