Radsam Posted April 21, 2005 Posted April 21, 2005 The wierdest thing happened to me. I am getting an error message when I use the command: Runwait(@ComSpec & " /c Start " & "http://google.com", "", @SW_HIDE)Error message:http://google.comApplication not foundThe command works on another my work laptop but not on my home PC. Anyone have any ideas? I'm desperate!! I use this type of code all the time, what gives?! Radsam
buzz44 Posted April 21, 2005 Posted April 21, 2005 What OS is your laptop? Mabye you need to have "www" in there. Runwait(@ComSpec & " /c Start " & "http://www.google.com", "", @SW_HIDE) qq
Radsam Posted April 21, 2005 Author Posted April 21, 2005 Doesn't matter.I try doing it manually from cmd promt and I get the following error:C:\>%comspec% /c start http://www.google.comAccess is denied.HELP!!
Xavier Posted April 21, 2005 Posted April 21, 2005 Doesn't matter.I try doing it manually from cmd promt and I get the following error:HELP!!<{POST_SNAPBACK}>Hello,Have you tried this? Hope you have IE (if no , you may change the target exe file)Runwait(@ComSpec & " /c Start iexplore http://google.com", "", @SW_HIDE)
BigDaddyO Posted April 21, 2005 Posted April 21, 2005 have you tried from a command prompt to simply type Start you should get a description of the Start command. if you get an error then your Pathing is messed up on your computer.
Radsam Posted April 21, 2005 Author Posted April 21, 2005 That works! Why do I need "iexplore" there now. I don't use it on my work laptop?
Xavier Posted April 21, 2005 Posted April 21, 2005 That works! Why do I need "iexplore" there now. I don't use it on my work laptop?<{POST_SNAPBACK}>Well, It might be caused if you use a Proxy ServerIn my corporate environnement, if i ommit iexplore, i am requested to log on the proxy server whereas in the other case it is fully fonctionnal.
Scottswan Posted April 21, 2005 Posted April 21, 2005 A simple way to launch a URL in the default browser in any Windows OS... ; Launch default browser (Have yet to find a better way!). Send("#r") Sleep(500) Send("http://www.google.com{enter}") -Scott
buzz44 Posted April 21, 2005 Posted April 21, 2005 (edited) You can retrieve the default browser from the reg key... HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\shell\open\command Example. $Url = "http://www.autoitscript.com/forum/index.php?" $OpenUrl = RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\shell\open\command", ""); Get the Internet browser path $PosParam = StringInStr ($OpenUrl, "%") ; Parameter location (%l) $OpenUrlLeft = StringLeft ($OpenUrl, $PosParam-1); Left handside of the path $OpenUrlRight = StringMid ($OpenUrl, $PosParam+2,999); Right handside of the path Run ($OpenUrlLeft & $url & $OpenUrlRight) Edited April 21, 2005 by Burrup qq
MHz Posted April 21, 2005 Posted April 21, 2005 (edited) You can retrieve the default browser from the reg key...HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\shell\open\commandFYII do not have this key on XP Pro.Edit: Correction: Had another browse and found it. Sorry, false alert. :"> Edited April 21, 2005 by MHz
buzz44 Posted April 21, 2005 Posted April 21, 2005 (edited) Yeah I know what you mean. It's got like 2 sets of alphabetical order like it goes. a b c d etc then a b c d And its in the 2nd set of alphabet things . Its not the only place you can find it but, I just choose that one because I'm used to it. Edited April 21, 2005 by Burrup qq
Radsam Posted April 21, 2005 Author Posted April 21, 2005 Thanks to all for the help. It ended up being registry values pointing to FireFox which I uninstalled a while ago. I had to change everyting to point to IE. Radsam
Guest mestrini Posted April 23, 2005 Posted April 23, 2005 (edited) Thanks to all for the help. It ended up being registry values pointing to FireFox which I uninstalled a while ago.I had to change everyting to point to IE.Radsam<{POST_SNAPBACK}>Hi,first post here addicted to autoit since i found out about it and after losing many hours reading old posts (no need to make any request yet ) i think a little help may come in handy.note that the following code is not mine but can't remember from which post i got it so i just apologise in advance to its creator for not giving him credits for it If @OSTYPE = "WIN32_NT" Then; for NT based systems Run(@ComSpec & ' /c start "title" ' & $url1, '', @SW_HIDE) ElseIf @OSTYPE = "WIN32_WINDOWS" Then; for 9x systems Run(@ComSpec & ' /c start ' & $url1, '', @SW_HIDE) EndIfWith this code i managed to have a web browser opened upon clicking on a label. The good part is that it works both in my laptop (iexplorer) and in my desktop (firefox)the var $url1 can be changed for an actual URLhope it helps someone cheers and many thanks to this great friendly community (and Jon above all )yes, i like to use smilies a lot Edited April 23, 2005 by mestrini
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