eLeMeNtZ Posted February 24, 2006 Share Posted February 24, 2006 run("www.google.com.au") This is the code, but when I try to run it, it says: "Unable to execute the external program. The system cannot find the file specified." Please help me fix this problem Thankyou, Luke Link to comment Share on other sites More sharing options...
The Kandie Man Posted February 24, 2006 Share Posted February 24, 2006 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 More sharing options...
eLeMeNtZ Posted February 24, 2006 Author Share Posted February 24, 2006 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 More sharing options...
nfwu Posted February 24, 2006 Share Posted February 24, 2006 Simple little UDF: Func _OpenWebpage($page) Run(@ComSpec & " /c " & '@start ' & $page & '', "", @SW_SHOW) endFunc TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
eLeMeNtZ Posted February 24, 2006 Author Share Posted February 24, 2006 $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 Thankyou, Luke Link to comment Share on other sites More sharing options...
nfwu Posted February 24, 2006 Share Posted February 24, 2006 $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 Thankyou, Luke $url = www.google.com Run(@ComSpec & " /c " & "@start " & $url ', "", @SW_SHOW) Try this. TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
eLeMeNtZ Posted February 24, 2006 Author Share Posted February 24, 2006 $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 More sharing options...
The Kandie Man Posted February 24, 2006 Share Posted February 24, 2006 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 More sharing options...
eLeMeNtZ Posted February 24, 2006 Author Share Posted February 24, 2006 Simple little UDF: Func _OpenWebpage($page) Run(@ComSpec & " /c " & '@start ' & $page & '', "", @SW_SHOW) endFunc Still has this error! Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 24, 2006 Share Posted February 24, 2006 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 More sharing options...
eLeMeNtZ Posted February 24, 2006 Author Share Posted February 24, 2006 Hi, what about $url = "www.google.com" Run(@ComSpec & " /c " & "@start " & $url , "", @SW_SHOW) So long, Mega Thanks, Worked Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 24, 2006 Share Posted February 24, 2006 Thanks, Worked 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 More sharing options...
eLeMeNtZ Posted February 24, 2006 Author Share Posted February 24, 2006 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 Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 24, 2006 Share Posted February 24, 2006 HI, use Scite, then it´s much easier to find your mistakes. 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 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