dscale Posted April 18, 2016 Posted April 18, 2016 I cannot figure out how to make this script work. If I delete the $link variable in $linktorun, the browser will open by itself. The thing is I want the link to open with the browser. $link = "http://www.google.com" $filePath = _PathFull("CocCoc\Browser\Application\Browser.exe", @LocalAppDataDir) $linktorun = $filePath & $link Run ($linktorun)
JohnOne Posted April 18, 2016 Posted April 18, 2016 (edited) You want browser to open at a specific page, but you don't want to supply it a page? EDIT: OK I see. Try... $link = " http://www.google.com" ; notice space $filePath = _PathFull("CocCoc\Browser\Application\Browser.exe", @LocalAppDataDir) $linktorun = $filePath & $link Run ($linktorun) Edited April 18, 2016 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
MuffinMan Posted April 18, 2016 Posted April 18, 2016 Willing to guess you might be missing a space between your app and your URL. Try this... $link = "http://www.google.com" $filePath = _PathFull("CocCoc\Browser\Application\Browser.exe", @LocalAppDataDir) $linktorun = $filePath & " " & $link Run ($linktorun)
junkew Posted April 18, 2016 Posted April 18, 2016 Consolewrite($link2run) will help in analysis FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Trong Posted April 19, 2016 Posted April 19, 2016 Local $Link = "http://www.google.com" Local $BrowserPath = @LocalAppDataDir & '\CocCoc\Browser\Application\Browser.exe' Local $BrowserLink = $BrowserPath & ' ' & $Link ;~ Local $BrowserLink = '"' & $BrowserPath & '" ' & $Link If FileExists($BrowserPath) Then Run($BrowserLink) Else ShellExecute($Link) EndIf Regards,
dscale Posted April 19, 2016 Author Posted April 19, 2016 (edited) MuffinMan, $linktorun = $filePath & " " & $link This worked. Thank you. Does anyone know how to make a wait for the webpage to load? I only know how to do this for internet explorer. Edited April 19, 2016 by dscale
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