Jump to content

Script won't launch or won't exit after launching URLs in ShellExecute


Go to solution Solved by LWC,

Recommended Posts

Posted (edited)

When I launch URLs via ShellExecute, it just opens the browser without launching the chosen URL.

If the browser was already open on a blank page, the script won't exit itself.

If the browser was already open on another URLs, only then does the script exit properly.

I use IE6.

Edited by LWC
Posted

No, this happens even in a script that has nothing but this specific line.

Try typing the url in your windows 'RUN' box. If it doesn't work from there, it may be some windows/IE setting that's preventing it.

William

Posted (edited)

This happen compiled also?

Yes.

may we see your script and know what web browsers you are using?

ShellExecute("http://www.autoitscript.com")

I use IE6.

Yes, the above code is enough as a script of its own to trigger the issue. Edited by LWC
Posted (edited)

This doesn't seem to happen in IE8. Could this be about IE6? It also seems I'm not the first to experience it:

 

Edited by LWC
Automated links
Posted

You could try an alternative like this:

$url = "http://www.autoitscript.com"
Run(@ComSpec & ' /c Start "" ' & $url, @ScriptDir, @SW_HIDE)

Or use a DLL call to shell32.dll and shellexecute that way, I think that's what autoit does when you use ShellExecute(), but if you call it yourself you might be able to adjust it a little.

Posted

I don't know what the code behind ShellExecute is and how it differs from the alternative code. But for the most part ShellExecute has been working very well and for all we know the alternative has issues as well.

It might be worth investigating though. (Just saw your ticket appear, so I guess it will be investigated)

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
×
×
  • Create New...