Hi,
Here I start with the software and I don't know which functions to use to create my script.
I will briefly explain the principle to you.
There is Chrome and Mozilla running on the same PC.
I would like to detect when Mozilla is used, so in the main window, with X (10 minutes for example) inactivity time on Mozilla, we automatically return to Chrome.
I hope I was understandable?
If you can help me
Thank you!
Clem
Script detection of the open window
Re: Script detection of the open window
Do you want to change the system default web browser based on inactivity, or just which browser window is active?
For example, if you use Chrome as your default browser, but you occasionally use Firefox for a specific task, and while Firefox is open you want any clicked hyperlinks to open in Mozilla instead of Chrome for a period of time?
Hope that makes sense...
For example, if you use Chrome as your default browser, but you occasionally use Firefox for a specific task, and while Firefox is open you want any clicked hyperlinks to open in Mozilla instead of Chrome for a period of time?
Hope that makes sense...
Re: Script detection of the open window
Oh no, but I understood your idea.
In fact on Chrome there is an animation that scrolls, but when the person wants to use the internet they go to Mozilla.
So I would like, when the person no longer uses Mozilla and after a period of inactivity, to put the Chrome window back where there is animation
I think my idea is clearer?
In fact on Chrome there is an animation that scrolls, but when the person wants to use the internet they go to Mozilla.
So I would like, when the person no longer uses Mozilla and after a period of inactivity, to put the Chrome window back where there is animation
I think my idea is clearer?
Re: Script detection of the open window
The problem I currently have is that I haven't found for window detection, so even when it's in Chrome my script runs while I wish it didn't work when it's in Chrome
Re: Script detection of the open window
Hi,
Use 'Window Spy' to detect windows.
You'll need to use the If WinActive("ahk_class Chrome_WidgetWin_1") command (I don't have Mozilla on my desk). And also the If WinExist command.
If WinActive("ahk_class Chrome_WidgetWi ... Active.htm
#Persistent so the script will run all the time
And the Settimer command.
https://autohotkey.com/docs/commands/SetTimer.htm
I got high fever but it should look something like this:
If both windows exist and chrome not active for 10 mins then activate Mozilla.
The examples on the SetTimer page helps a lot!
Hope I could help a bit. Enjoy scripting!
Use 'Window Spy' to detect windows.
You'll need to use the If WinActive("ahk_class Chrome_WidgetWin_1") command (I don't have Mozilla on my desk). And also the If WinExist command.
If WinActive("ahk_class Chrome_WidgetWi ... Active.htm
#Persistent so the script will run all the time
And the Settimer command.
https://autohotkey.com/docs/commands/SetTimer.htm
I got high fever but it should look something like this:
If both windows exist and chrome not active for 10 mins then activate Mozilla.
The examples on the SetTimer page helps a lot!
Hope I could help a bit. Enjoy scripting!
I like to think extroverts have attention dependency disorder.
my projects: D2 Reconsidered - Diablo 2 Resurrected script | HideMyIcon, customizable desktop icon hider for Windows 10
my projects: D2 Reconsidered - Diablo 2 Resurrected script | HideMyIcon, customizable desktop icon hider for Windows 10
Re: Script detection of the open window
ahk_class MozillaWindowClassaeiklmr wrote:I don't have Mozilla on my desk
Here's a screenshot from my computer:
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 170 guests