Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mysterie! ActivateApp & Sendkeys work on one pc but not another?

Status
Not open for further replies.

oltran

Technical User
Dec 26, 2002
19
US
Hi, I am tring to streamline some processes at my job, and I am using sendkeys, activateapp etc. Ok in my office we all use WIN NT and the latest version of IE. I have developed this program that will work great on my computer at work and at home (i have win 2000 at home) but i gave it to one of my co-workers to test and it seems that activateapp & sendkeys just sits there. but i do have a line of vbscript code that works that just starts up the program (ss.run....). No errors are reported either and I had him enable the ActiveX security settings in IE also. Here is an example of the code:

function SendkeysTest
Dim ss, starttime, waittime, currenttime
Set ss = CreateObject("WScript.Shell")
ss.run "C:\WINNT\NOTEPAD.EXE",1
starttime = Timer()
currenttime = starttime
Do Until currenttime-starttime > waittime
currenttime = Timer()
Loop
ss.SendKeys "Hi, I wish I could get this to work"
Set ss = nothing
end function

Please help!!! :)
Jason
 
Mystery... stupid mispellin' ahah
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top