topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 3:05 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

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

rsteward

  • Supporting Member
  • Joined in 2010
  • **
  • default avatar
  • Posts: 22
    • View Profile
    • Donate to Member
IDEA: App to automatically refresh an inactive window.
« on: January 26, 2012, 10:18 AM »
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

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: IDEA: App to automatically refresh an inactive window.
« Reply #1 on: January 26, 2012, 10:29 AM »
Consider this:

Code: Autohotkey [Select]
  1.  
  2. WindowMatchText := "Notepad"
  3. RefreshInterval := 2000 ; Milliseconds.
  4.  
  5. SetTimer, WindowRefresh, % RefreshInterval
  6.  
  7. Return ; End of auto-execute section.
  8.  
  9.  
  10. WindowRefresh:
  11. {
  12.     ControlSend, , {F5}, % WindowMatchText
  13. }
  14. Return

rsteward

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

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: IDEA: App to automatically refresh an inactive window.
« Reply #3 on: January 26, 2012, 11:23 AM »
Any flavour of AHK will work with that.