KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Script to open a web page with the non-default browser
Topic Summary:
Created On: 04/19/2020 11:01 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 Script to open a web page with the non-default browser   - Alan Cantor - 04/19/2020 11:01 AM  
 Script to open a web page with the non-default browser   - Alan Cantor - 04/19/2020 11:22 AM  
 Script to open a web page with the non-default browser   - MDH - 04/19/2020 11:56 AM  
 Script to open a web page with the non-default browser   - monkey8 - 04/19/2020 12:29 PM  
 Script to open a web page with the non-default browser   - Alan Cantor - 04/19/2020 04:51 PM  
Keyword
 04/19/2020 11:01 AM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 3938
Joined: 12/08/2007

I normally don't use Chrome. But there is a site that (apparently) was not tested with Firefox, and it doesn't work with Firefox.

 

I'm trying to make a voice command to open only that site via Chrome.

 

If I do this...

 

AppBringUp ( "https://xxxyyyzzz.com/auth/signin" )

...The site opens in my default browser. And if I do this:

 

AppBringUp ( "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" )

 

...Chrome opens. But I can't figure out how to combine the two. I thought the obvious solution would be something like this, but the script fails:

 

AppBringUp ( "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe https://xxxyyyzzz.com/auth/signin" )

 04/19/2020 11:22 AM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 3938
Joined: 12/08/2007

I thought I had figured it out, but no. This still opens in my default browser, even though I have specified Chrome.

 


AppBringUp ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "https://xxxyyyzzz.com" )



 04/19/2020 11:56 AM
User is offline View Users Profile Print this message

Author Icon
MDH
Top-Tier Member

Posts: 2203
Joined: 04/02/2008

How about an old-school approach:

Assuming your Chrome on desktop is labelled as Google Chrome (if not, substitute that name instead):

I named this command, Start Amazon, and it works, opening in Chrome, which is not my default browser.

 

 

HeardWord "open","Google Chrome"

Wait 2

SendDragonKeys "Amazon.com"

Wait .2

SendDragonKeys "{Enter}"

 

MDH

 



-------------------------
 04/19/2020 12:29 PM
User is offline View Users Profile Print this message

Author Icon
monkey8
Top-Tier Member

Posts: 3643
Joined: 01/14/2008

If not Mark's approach then try ShellExecute for bringing up URL addresses direct from any browser.  AppBringUp only has a parameter for starting directories. Note that there is a space between "chrome.exe" and "http…"

 

Sub Main

ShellExecute "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe http://www.knowbrainer.com/forums/forum/index.cfm"

End Sub

 

With KnowBrainer I added a function called OpenWebsite where you can specify the browser you want the URL to open with. After opening the KnowBrainer command wizard just click on the ? then Contents | KnowBrainer Scripting Extensions where you will find scripting extensions like "OpenWebsite" and "DisplayNumbersAndClick".



-------------------------



 04/19/2020 04:51 PM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 3938
Joined: 12/08/2007

Hi Mark and Lindsay,

Thank you for your suggestions. The ShellExecute approach has been working nicely!
Statistics
31891 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 1 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 488 guests browsing this forum, which makes a total of 489 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2021 FuseTalk™ Inc. All rights reserved.