Solved

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

Posted on 2006-10-19
6
243 Views
Last Modified: 2010-04-23
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
Comment
Question by:sirbounty
6 Comments
 
LVL 13

Expert Comment

by:newyuppie
ID: 17767174
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
 
LVL 10

Expert Comment

by:gangwisch
ID: 17767179
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
 
LVL 67

Author Comment

by:sirbounty
ID: 17767188
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
 
LVL 67

Author Comment

by:sirbounty
ID: 17817492
I can sendkeys to my form - I got this working using me.bringtofront
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 17849770
Closed, 500 points refunded.
DarthMod
Community Support Moderator
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now