Sign in to follow this  
Followers 0
fabio

How to open a new IE and load a URL?

16 posts in this topic

Guys, I need some help.

I use the command:

$Browser = "rundll32 url.dll,FileProtocolHandler"

$Launch = "START /MIN " & $Browser & " " & $URL

Run(@ComSpec & " /c " & Chr(34) & $Launch & Chr(34), "", @SW_HIDE)

But i need it to open a new IE, not to load the URL in an existing one (if exists).

Can anyone help me?

Thanks.

Share this post


Link to post
Share on other sites



Thanks Lar, but where do i use it?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Here is the code...

$url = "http://www.the-patriot.net"
Run(@ComSpec & " /c start /max" & $url, '',@SW_HIDE)

Let me know how that turns out for you,

JS

Edit: I changed the code abit to something I just learned :)

JS

Edited by JSThePatriot

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Hey JS, off topic, but I wanted to ask you a quick question. Do you ever use MouseClicks in your functions? I know that you do a lot of system scripts for multiple computers right?

Share this post


Link to post
Share on other sites

Hey JS, off topic, but I wanted to ask you a quick question. Do you ever use MouseClicks in your functions? I know that you do a lot of system scripts for multiple computers right?

<{POST_SNAPBACK}>

I havent used mouse clicks yet, though I will be doing that soon I think. I have a script that is opening up a webpage and it is supposed to be clicking a bunch of links and then printing the resulting pages. The trouble is... it is only supposed to click certain links not all of them.

Let me know maybe we can figure it out together. I know I am interested in it.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Do you have AIM? Because I'm working on click's now too. I know how to use them well, but what I really want to do is solve this one particular problem I am having...

Share this post


Link to post
Share on other sites

Sorry, but i still didn´t solve my problem.

Where do i use "-new"?

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

$url = "http://www.the-patriot.net"
Run(@ComSpec & " /c start /max" & $url, '',@SW_HIDE)
Use that Edited by the_lord_mephy

My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites

Larry is right. we can use Internet Explorer Command Line Switches to open a website in IE a new windows.

$url = "http://www.the-patriot.net"
Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe -new " & $url)

For JS's code. If you have another browser just like MYIE2 for defult browser, It can open multiple web pages in just one window, your will connect a website with it, but not with IE.

$url = "http://www.the-patriot.net"
Run(@ComSpec & " /c start /max" & $url, '',@SW_HIDE)

Sometimes, Larry's way is very useful. Because Myie open multiple web pages in just one window, and it is very difficult to activate each a child window.

My English is poor. sorry

Share this post


Link to post
Share on other sites

The problem is that i need the script to run on WindowsXp and WindowsNT. The command:

Run(@ProgramFilesDir & "\Plus!\Microsoft Internet\iexplore.exe -new " & $url)

works on NT, but not on XP because the path is different. Do you have an idea of how to use it on both systems?

Thanks again.

Share this post


Link to post
Share on other sites

You should know where "iexplore.exe" is. Like this

$url = "http://www.the-patriot.net"
$path1=@ProgramFilesDir & "\Plus!\Microsoft Internet\iexplore.exe"
$path2=@ProgramFilesDir & "\Internet Explorer\iexplore.exe"
If FileExists($path1) Then
    Run($path1 & " -new " & $url)
ElseIf FileExists($path2) Then
    Run($path2 & " -new " & $url)
EndIf

Share this post


Link to post
Share on other sites

The shortest way to do this fabio would be to do what I suggested above, but it's up to you.

Here it is again incase you missed it.

$url = "http://www.the-patriot.net"
Run(@ComSpec & " /c start /max" & $url, '',@SW_HIDE)

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Another way you can search the file, and get its path. This way will more reliably.

Share this post


Link to post
Share on other sites

Konan, thanks very much... i used the code you mention and it solved my problem.

$url = "http://www.the-patriot.net"

$path1=@ProgramFilesDir & "\Plus!\Microsoft Internet\iexplore.exe"

$path2=@ProgramFilesDir & "\Internet Explorer\iexplore.exe"

If FileExists($path1) Then

Run($path1 & " -new " & $url)

ElseIf FileExists($path2) Then

Run($path2 & " -new " & $url)

EndIf

And JSThePatriot, the code you suggested doesn´t work on WNT, as i tested here. But thanks for the help.

:)

Thanks guys, you saved me!!

Share this post


Link to post
Share on other sites

Oh my I wasnt aware of that. Hrm... :-/ I will have to test that out so I dont do this again :-P

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

My pleasure.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0