[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

Shouldn't 'sendkeys' be enough to stop inactivity?

I have a scheduled task that kicks off when I'm "idle".  But I only want it to run at a certain time.  There's no way to accomplish what I want with the task, without having it run 'each' time I'm idle throughout the day.
So, I 'tried' to create a simple app that would use sendkeys to hit the insert key for me every few minutes.
Doesn't appear to be working though - any ideas why not?

Form_Load
  tmr.Start

TimerFired
  Sendkeys.SendWait("{INSERT}")
  Sendkeys.SendWait("{INSERT}")
End Sub

That's about all there is to it...(I didn't want to leave 'insert' off...that's why it's there twice)
0
sirbounty
Asked:
sirbounty
1 Solution
 
newyuppieCommented:
why dont you put a system time check, if its not what you want, exit the sub, otherwise, check if its idle and run the loop.

ny
0
 
gangwischCommented:
what you need to do is:
appactivate "internet explorer"
sendkeys.send("http://")
sendkeys.send("{enter}")
but i do think that
you should try doing
sendkeys.send("{INS}")

good luck
0
 
sirbountyAuthor Commented:
So, I can't sendkeys to my form? (since it's already "there")?
I didn't want to have to load IE, or any other app - I thought I could accomplish this within my program...
0
 
sirbountyAuthor Commented:
I can sendkeys to my form - I got this working using me.bringtofront
0
 
DarthModCommented:
Closed, 500 points refunded.
DarthMod
Community Support Moderator
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now