Zhorn Software
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
treven
Guest

Refresh buttons? Empty Refresh buttons?

Thu Apr 29, 2021 6:15 pm
I am using this program to keep a pc awake that we have an excel file displayed that constantly changes information. Is there a way to make the program press ctrl + alt + f5 to refresh the excel workbook every minute? currently its pressing f5 virtual button, can you do multiple buttons and does it virtual button have the same effect as regular keys?

Thank you!
avatar
Guest
Guest

Refresh buttons? Empty Re: Refresh buttons?

Fri Apr 30, 2021 6:19 am
You can take a look at this post :
https://zhornsoftware.forumotion.com/t388-caffeine-key-combination

Is there no excel macro for autorefreshing ? Maybe google can help for a solution .

A program can decide to accept simulated keys or not , also you cannot send keys to a program that runs at with higher permissions than the sending program.


Code:
$k= New-Object -com "Wscript.Shell"
$a=30

while($true)
{
$k.sendkeys("^%{F5}")
Start-Sleep -seconds $a
}

You can use windows Powershell to send keys , you can google it for syntax and how to use .

^  is ctrl
% is alt


Last edited by Sooyke on Sat May 01, 2021 6:12 am; edited 4 times in total (Reason for editing : changed level to permissions ...changed F15 to F5..)
Back to top
Permissions in this forum:
You can reply to topics in this forum