KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Is Chrome open,If Not Open
Topic Summary:
Created On: 06/14/2021 08:21 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Is Chrome open,If Not Open   - Robert Snow - 06/14/2021 08:21 PM  
 Is Chrome open,If Not Open   - Todd - 06/14/2021 09:54 PM  
 Is Chrome open,If Not Open   - Robert Snow - 06/16/2021 01:00 PM  
 Is Chrome open,If Not Open   - Todd - 06/16/2021 11:40 PM  
 Is Chrome open,If Not Open   - Lunis Orcutt - 06/15/2021 11:47 AM  
 Is Chrome open,If Not Open   - Robert Snow - 06/16/2021 01:08 PM  
 Is Chrome open,If Not Open   - R. Wilke - 06/15/2021 12:42 PM  
 Try saying Goggle for . Yikes, less than 20%   - Robert Snow - 06/16/2021 01:15 PM  
 Archie Is Chrome open,If Not Open   - monkey8 - 06/15/2021 01:26 PM  
 Is Chrome open,If Not Open   - Todd - 06/16/2021 11:59 PM  
 Is Chrome open,If Not Open   - monkey8 - 06/17/2021 04:06 AM  
 Is Chrome open,If Not Open   - Todd - 06/19/2021 02:02 AM  
 Is Chrome open,If Not Open   - Lunis Orcutt - 06/16/2021 02:57 PM  
 Is Chrome open,If Not Open   - Matt_Chambers - 06/16/2021 07:44 PM  
 Is Chrome open,If Not Open   - Robert Snow - 06/18/2021 06:26 PM  
 Is Chrome open,If Not Open   - lifeisgood - 06/19/2021 03:05 PM  
 Is Chrome open,If Not Open   - Matt_Chambers - 06/19/2021 03:34 PM  
 Is Chrome open,If Not Open   - Lunis Orcutt - 06/19/2021 06:13 PM  
 Is Chrome open,If Not Open   - Matt_Chambers - 06/19/2021 06:16 PM  
 Is Chrome open,If Not Open   - Lunis Orcutt - 06/20/2021 12:45 PM  
 Is Chrome open,If Not Open   - Robert Snow - 09/21/2021 03:15 PM  
 Is Chrome open,If Not Open   - kkkwj - 06/19/2021 07:46 PM  
 Is Chrome open,If Not Open   - Matt_Chambers - 06/19/2021 08:08 PM  
 Is Chrome open,If Not Open   - Robert Snow - 06/21/2021 10:54 PM  
Keyword
 06/15/2021 01:26 PM
User is offline View Users Profile Print this message

Author Icon
monkey8
Top-Tier Member

Posts: 3824
Joined: 01/14/2008

Originally posted by: Robert Snow  

 

I have been able to use the following code, thanks again, to open my Groupy files.

 

 Now I'm ready for my next step. Opening a URL in Chrome, which, might not be open.  So I have to check to see if Chrome is already running, if it is, enter the URL. If it is not open I need to open Chrome and enter the URL .

 

 

 

 

 

You can test if Chrome is open or an instance of chrome is open with a slightly mutated FindWindow function where you can set the wildcard for the window title to a '0' because an empty string will not work as a wildcard but this will.

 

Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, ByVal _
lpWindowName As Long) As Long
'script by Lindsay Adam pcbyvoice 
Sub Main
    If (FindWindow ("Chrome_WidgetWin_1",0)) Then
     'do your stuff
    Else
     'do your other stuff
    End If
End Sub


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



 06/16/2021 11:59 PM
User is offline View Users Profile Print this message

Author Icon
Todd
Advanced Member

Posts: 164
Joined: 02/03/2008

Originally posted by: monkey8

 

 

If (FindWindow ("Chrome_WidgetWin_1",0)) Then

 

monkey8,

 

 

Very nice solution.  How did you determine the class name? I do not have access to Spy++ (Visual Studio). I am thinking a program such as Windows Detective or WinSpy++ might work. Any suggestions?

 

 

Thanks.



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

Todd Kermit
Principal
SpeechWise
todd@speechwise.com

www.speechwise.com

Dragon Professional Individual 15.61, Intel Core i7-10700K, 16GB RAM, Windows 10 Pro, Plantronics CS55/Andrea PureAudio USB-SA

 06/17/2021 04:06 AM
User is offline View Users Profile Print this message

Author Icon
monkey8
Top-Tier Member

Posts: 3824
Joined: 01/14/2008

Originally posted by: Todd
Originally posted by: monkey8

 

Very nice solution.  How did you determine the class name? I do not have access to Spy++ (Visual Studio). I am thinking a program such as Windows Detective or WinSpy++ might work. Any suggestions?

 

 

WinID http://www.winid.com/Download.htm

 

Note however that the window title can change (although the class name never will), hence the wildcard with the mutated windows API function which will always allow you to find an active instance of chrome. You can use SetForegroundWindow to switch to the instance using the result of find window.

 

SetForegroundWindow (FindWindow (…))

 

 



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



 06/19/2021 02:02 AM
User is offline View Users Profile Print this message

Author Icon
Todd
Advanced Member

Posts: 164
Joined: 02/03/2008

Originally posted by: monkey8 WinID http://www.winid.com/Download.htm 

 

Thank you.  I will give WinID a try.



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

Todd Kermit
Principal
SpeechWise
todd@speechwise.com

www.speechwise.com

Dragon Professional Individual 15.61, Intel Core i7-10700K, 16GB RAM, Windows 10 Pro, Plantronics CS55/Andrea PureAudio USB-SA



Statistics
32171 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 380 guests browsing this forum, which makes a total of 381 users using this forum.

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