LWC Posted November 17, 2010 Share Posted November 17, 2010 (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 November 17, 2010 by LWC Link to comment Share on other sites More sharing options...
somdcomputerguy Posted November 17, 2010 Share Posted November 17, 2010 Post the code you're using. That'll help others help you. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
LWC Posted November 17, 2010 Author Share Posted November 17, 2010 (edited) ShellExecute("http://www.autoitscript.com") Edited November 17, 2010 by LWC Link to comment Share on other sites More sharing options...
JohnOne Posted November 17, 2010 Share Posted November 17, 2010 (edited) never had a problem with that, and that function works fine for me whether the browser is open, closed, or whatever page its on. I supect you have more to your code that which is causing your problem. Edited November 17, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
LWC Posted November 17, 2010 Author Share Posted November 17, 2010 No, this happens even in a script that has nothing but this specific line. Link to comment Share on other sites More sharing options...
saywell Posted November 17, 2010 Share Posted November 17, 2010 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 Link to comment Share on other sites More sharing options...
LWC Posted November 17, 2010 Author Share Posted November 17, 2010 (edited) It works from RUN. Even more so, there's no problem if I use Run through AutoIt instead of ShellExecute:Run(@ComSpec & ' /c start http://www.autoitscript.com')What's going on? Edited November 22, 2010 by LWC Link to comment Share on other sites More sharing options...
Bert Posted November 17, 2010 Share Posted November 17, 2010 If you are using IE then do this: #include <IE.au3> _IECreate("http://www.autoitscript.com") IF you are doing Firefox, then look at this page for instructions: http://kb.mozillazine.org/Command_line_arguments The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
wakillon Posted November 17, 2010 Share Posted November 17, 2010 You could try like this ShellExecute( "iexplore.exe", "http://www.google.com/" ) ; or ShellExecute( @ProgramFilesDir & "\Mozilla Firefox\firefox.exe", "http://www.google.com/translate_t" ) AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
LWC Posted November 17, 2010 Author Share Posted November 17, 2010 It doesn't matter what I use as it's a program others will use too. I can't tell them which browser to use. Link to comment Share on other sites More sharing options...
JohnOne Posted November 17, 2010 Share Posted November 17, 2010 It doesn't matter what I use as it's a program others will use too. I can't tell them which browser to use.I doubt anyone else will have a problem with the shellexecute.This happen compiled also? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Bert Posted November 17, 2010 Share Posted November 17, 2010 may we see your script and know what web browsers you are using? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
LWC Posted November 17, 2010 Author Share Posted November 17, 2010 (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 November 17, 2010 by LWC Link to comment Share on other sites More sharing options...
LWC Posted November 21, 2010 Author Share Posted November 21, 2010 This doesn't seem to happen in IE8. Could this be about IE6? It also seems I'm not the first to experience it:http://www.autoitscript.com/forum/index.php?showtopic=72561http://www.autoitscript.com/forum/index.php?showtopic=76861 Link to comment Share on other sites More sharing options...
JohnOne Posted November 21, 2010 Share Posted November 21, 2010 Well seeing as though those threads are over 2 years old, I would imagine it does have something to do with IE6. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Juvigy Posted November 22, 2010 Share Posted November 22, 2010 Is IE your default Browser ? If not make it and try again. Link to comment Share on other sites More sharing options...
Tvern Posted November 22, 2010 Share Posted November 22, 2010 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. Link to comment Share on other sites More sharing options...
LWC Posted November 22, 2010 Author Share Posted November 22, 2010 (edited) The alternative indeed works. So does this DLLCall suggestion.I've submitted a request to fix ShellExecute to use the aforementioned DLLCall suggestion whenever it launches URLs. Edited November 22, 2010 by LWC Link to comment Share on other sites More sharing options...
Tvern Posted November 22, 2010 Share Posted November 22, 2010 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) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now