DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: IDEA: App to automatically refresh an inactive window.  (Read 5,454 times)

rsteward

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 22
IDEA: App to automatically refresh an inactive window.
« on: January 26, 2012, 04:18 PM »
I would like to refresh a window on a set interval (like browser extensions do).  Is there an AUTOHOTKEY solution to sending F5 (or other keystrokes) to an inactive window (non-browser app)? 

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: App to automatically refresh an inactive window.
« Reply #1 on: January 26, 2012, 04:29 PM »
Consider this:

Code: (autohotkey)
#Persistent
SetTitleMatchMode, 2

WindowMatchText := "Notepad"
RefreshInterval := 2000 ; Milliseconds.

SetTimer, WindowRefresh, % RefreshInterval

Return ; End of auto-execute section.


WindowRefresh:
{
    ControlSend, , {F5}, % WindowMatchText 
}
Return

rsteward

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 22
Re: IDEA: App to automatically refresh an inactive window.
« Reply #2 on: January 26, 2012, 04:52 PM »
Is this for AutoHotkey Basic, AutoHotkey_L, etc?

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: App to automatically refresh an inactive window.
« Reply #3 on: January 26, 2012, 05:23 PM »
Any flavour of AHK will work with that.

Original address: https://www.donationcoder.com/forum/index.php?topic=29728.0