473,395 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

need to design code to frequently simulate key press every 30/45 secs

2
Hi Every body there,

I need to write a Vb code, so that it could simulate the keyboard press every 30 secs/45 secs untill some time desiganted.

I have tried using API, with sendkeys, tried some .exe file "no sleep" however not of any help, the send keys actually sends the command may be but it doesnt get registers, hence any idea on putting this keyboard press solve.

Thanks
Bivin
Oct 21 '13 #1
4 1200
pod
298 100+
May I ask why you need to simulate a keyboard press?
Oct 21 '13 #2
!NoItAll
297 100+
Sendkeys is how it is done. You will, however need to make sure the keystrokes are being sent to the application where you want them to go - otherwise they will simply be executed on the application that currently has focus on the Windows desktop. This is very tricky and fraught with peril. You will need to PInvoke some Win32 APIs to find the window you want, validate it and then set it to have focus before you use sendkeys. You should do it before EVERY keystroke.
You should be rolling your eyes about now and saying: Wow, this is a bad idea...
Oct 23 '13 #3
bivb
2
problem i am facing is, i work on three and more systems simultaneously and this causes each machine un attended for 5-10 mins and causes auto lock, however i have created code to avoid the auto lock by frequently sending send keys, but my real problem is the system registers only the last actual key press and this causes me penalty on my time utilisation captured, hence cutting long story short i need code which performs actual key press of keyboard or mouse but via code.

Hope i have cleared by request.
Oct 25 '13 #4
Rabbit
12,516 Expert Mod 8TB
I'm not sure that we can answer this. This sounds like a huge security concern. The reason the computer auto locks is so that in case someone forgets to manually lock it when they step away, there's a smaller time period for someone else to come along and use the computer. We do not help people bypass security like this.
Oct 25 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ali | last post by:
I am in great need of code that will make a dome. I would like the inputs to be similar to that of the sphere. ie: pos=(x0, y0, z0) radius = R color = (r,g,b) etc. I am using VPython of...
1
by: Cibulya Dmitriy | last post by:
Hi All, I want to catch the next MSSQL error in my SQL code with following continue calculations Server: Msg 17, Level 16, State 1, Line 1 SQL Server does not exist or access denied.
3
by: pw | last post by:
Hi, I am having a mental block trying to figure out how to code this. Two tables: "tblQuestions" (fields = quesnum, questype, question) "tblAnswers" (fields = clientnum, quesnum, questype,...
34
by: Mark Kamoski | last post by:
Hi-- Please help. I need a code sample for bubble sort. Thank you. --Mark
2
by: Mark Kamoski | last post by:
Hi Everyone-- Please help. I need a code sample for exchange sort. Thank you. --Mark
2
by: Mark Kamoski | last post by:
Hi Everyone-- Please help. I need a code sample for insertion sort. Thank you. --Mark
2
by: Mark Kamoski | last post by:
Hi Everyone-- Please help. I need a code sample for merge sort. Thank you. --Mark
1
by: saravanatmm | last post by:
I need javascript code for validate the email address. Email address field cannot allowed the capital letters, special characters except '@' symbol. But can allowed the small letters, numeric...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.