Jump to content
Sign in to follow this  
Radsam

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

Share this post


Link to post
Share on other sites

What OS is your laptop? Mabye you need to have "www" in there.

Runwait(@ComSpec & " /c Start " & "http://www.google.com", "", @SW_HIDE)

qq

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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.


hmm... I guess I have to have a signature...

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...