I wants to know about how can i get which key has been pressed from VB script (except input box function).
Regards
Biswajit.
ANSWER: First I need to know where is the Focus?
I mean, is focus on Form/edit box/some object?
You can use KeyDown, KeyPress or KeyUp event on focus object.
Let me know if you have any questions.
Subbu.
---------- FOLLOW-UP ----------
QUESTION: the schenerio is like this-the vbscript will run background.it will show in task manager.the focus may be desktop, sometime it may be ie application.
ANSWER: Are you executing Task Manager as a shell from VB Script?
Is your VB Script is a TSR (Terminate and Stay Resident) program?
---------- FOLLOW-UP ----------
QUESTION: No. I am not executing Task Manager as a Shell from VB Script. i will run the vbscript the script will copy files from one location to another location non interactively. but only when i will press the esc key or some other key(say Q) then the copy operation will aborted.
Thanks.
Biswajit.
Answer Now I understand your question.
When you run the vbscript to copy files from one location to another just display a Form with Model dialog (it means focus should always on the Form).
If user try to remove the focus using mouse write some code on LostFocus event.
If user try to type some key when focus is on the Form write some code on KeyUp / KeyDown event.