remin Posted October 6, 2014 Share Posted October 6, 2014 I have 3 browsers installed on my pc: 1) chrome (=default) 2) firefox 3) ie When I click on an URL in an external program, it always launches the default browser (chrome in my case) regardless of whether or not the active browser is the default browser or not. I don't want this. When my active browser is firefox i want to open the external url's in firefox, when the active browser is IE I want to open the external url's in IE. When Chrome is the active browser or when no browser is currently open, the url's must be redirected to chrome. Is it possible to realize this with the help of autoit? Link to comment Share on other sites More sharing options...
Danyfirex Posted October 6, 2014 Share Posted October 6, 2014 (edited) if winactive shellexecute("path broswer","URL") that's the way. Saludos Edited October 6, 2014 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
JohnOne Posted October 6, 2014 Share Posted October 6, 2014 I don't think that alone will solve your problem. First you need to detect the you have clicked a link in some other application. Given the amount of applications there are out there, that's no trivial task. Probably need to do some sort of shell hooking, where you can detect a browser window opening, and then go from there. Maybe research the possibility of discovering where the message to open that browser window actually originated. Best of luck. Keep us informed. 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...
Iczer Posted October 6, 2014 Share Posted October 6, 2014 (edited) It maybe simplier than it seems - you can compile small autoit exe and make it "default browser". So windows do all work, and you choice browser to start as Danyfirex suggested. Edited October 6, 2014 by Iczer JohnOne 1 Link to comment Share on other sites More sharing options...
JohnOne Posted October 6, 2014 Share Posted October 6, 2014 Now that's a good plan. 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...
remin Posted October 8, 2014 Author Share Posted October 8, 2014 It maybe simplier than it seems - you can compile small autoit exe and make it "default browser". So windows do all work, and you choice browser to start as Danyfirex suggested. Can you please tell a bit more about your solution. I don't understand what you mean, sorry. Link to comment Share on other sites More sharing options...
JohnOne Posted October 8, 2014 Share Posted October 8, 2014 he means, that in the registry you can set your default browser. If you set it to your own script, you can simply use Danyfirex' suggestion in post #2 in it. I have not tried it, but I assume the link would be passed to your script as a command line parameter. It would be fairly straight forward, here are some pointers to get you started. Learn how to get command line arguments. Well that's about it really besides ShellExecute and a bit of logic. Have a go and report back if you have trouble. 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...
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