Jump to content

Unable to execute the external program.


eLeMeNtZ
 Share

Recommended Posts

You are trying to open a URL. You are using a run command. The run command must be used with an executable. It would therefore have to be an .exe, .bat, .pif or other type of executable extension.

Do this instead"

Run(@ComSpec & " /c " & '@start www.google.com.au', "", @SW_HIDE)

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Link to comment
Share on other sites

You are trying to open a URL. You are using a run command. The run command must be used with an executable. It would therefore have to be an .exe, .bat, .pif or other type of executable extension.

Do this instead"

Run(@ComSpec & " /c " & '@start www.google.com.au', "", @SW_HIDE)
How could I do that with a variable?
Link to comment
Share on other sites

Simple little UDF:

Func _OpenWebpage($page)
     Run(@ComSpec & " /c " & '@start ' & $page & '', "", @SW_SHOW)
endFunc
Link to comment
Share on other sites

$url=www.google.com

Func _OpenWebpage($url)
     Run(@ComSpec & " /c " & '@start ' & $url & '', "", @SW_SHOW)
endFunc

This is my code now, but when I try to run it it says:

$url=www.google.com

^ Unknown Function

Please help :o

Thankyou,

Luke

Link to comment
Share on other sites

$url=www.google.com

Func _OpenWebpage($url)
     Run(@ComSpec & " /c " & '@start ' & $url & '', "", @SW_SHOW)
endFunc

This is my code now, but when I try to run it it says:

$url=www.google.com

^ Unknown Function

Please help :o

Thankyou,

Luke

$url = www.google.com
 Run(@ComSpec & " /c " & "@start " & $url ', "", @SW_SHOW)

Try this.

Link to comment
Share on other sites

$url = www.google.com
 Run(@ComSpec & " /c " & "@start " & $url ', "", @SW_SHOW)

Try this.

Now it says:

Run(@ComSpec & " /c " & "@start " & $url ', "", @SW_SHOW)
 Run(@ComSpec & " /c " & "@start " & $url ^ ERROR

Error: String missing closing quote.

Please help fix, thankyou!

Link to comment
Share on other sites

Run(@ComSpec & " /c " & "@start " & $url , "", @SW_SHOW)

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Link to comment
Share on other sites

Still has this error!

Hi,

what about

$url = "www.google.com"
Run(@ComSpec & " /c " & "@start " & $url , "", @SW_SHOW)

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Thanks, Worked :o

HI,

no prob.

This should also work (for IE)

#include<ie.au3>;need to be downloaded first
$url = "http://www.google.de"
$ieObj = _IECreate ()
         _IENavigate ($ieObj, $url, 2)

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

HI,

no prob.

This should also work (for IE)

#include<ie.au3>;need to be downloaded first
$url = "http://www.google.de"
$ieObj = _IECreate ()
         _IENavigate ($ieObj, $url, 2)

So long,

Mega

$url = IniRead(@ScriptDir & "config.ini", "Config", "url", "NotFound")

RunUrl ()
Func Popup ()

;==========Function Run Url==========
Func RunUrl ()

Run(@ComSpec & " /c " & "@start " & $url , "", @SW_HIDE)


  Return

EndFunc
;==========Function Run Url==========

;==========Function Security Pop-Up==========
Func Popup ()

Sleep ( 2000 )
If WinExists("Security Information") Then
Send ("{enter}")
Else
Sleep ( 2000 )
If WinExists("Security Information") Then
Send ("{enter}")
Else
Exit
    EndIf
EndIf

  Return

EndFunc
;==========Function Security Pop-Up==========

This is my code now, but now when I run it, I get this error:

Func RunUrl ()

Error: "Func" statement has not matching "EndFunc".

Please help :o

Link to comment
Share on other sites

HI,

use Scite, then it´s much easier to find your mistakes. :o

Maybe should you also search for Autoit 1-2-3 from Valuater.

Your code:

$url = IniRead(@ScriptDir & "config.ini", "Config", "url", "NotFound")

RunUrl()
Popup()

;==========Function Run Url==========
Func RunUrl()
    Run(@ComSpec & " /c " & "@start " & $url, "", @SW_HIDE)
EndFunc  ;==>RunUrl 


;==========Function Security Pop-Up==========
Func Popup()
    
    Sleep(2000)
    If WinExists("Security Information") Then
        Send("{enter}")
    Else
        Sleep(2000)
        If WinExists("Security Information") Then
            Send("{enter}")
        Else
            Exit
        EndIf
    EndIf
EndFunc  ;==>Popup

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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