Jump to content

RunWait error


Recommended Posts

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.com

Application not found

The 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

Link to comment
Share on other sites

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 Server

In 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.

Link to comment
Share on other sites

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 by Burrup

qq

Link to comment
Share on other sites

You can retrieve the default browser from the reg key...

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\shell\open\command
FYI

I do not have this key on XP Pro.

Edit: Correction: Had another browse and found it. Sorry, false alert. :">

Edited by MHz
Link to comment
Share on other sites

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 by Burrup

qq

Link to comment
Share on other sites

Guest mestrini

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 :huh: ) 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)
           EndIf

With 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 URL

hope it helps someone :)

cheers and many thanks to this great friendly community (and Jon above all :D )

yes, i like to use smilies a lot :D

Edited by mestrini
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...