Solved

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

Posted on 2006-10-19
6
248 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 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