2016-02-19 95 views
0

只有当用户键入到专有企业应用程序中时,才能查看哪些工具/参考资料才能使用自定义键盘记录程序捕获数据?仅当使用特定应用程序时才使用键盘记录程序

例如,当用户在excel中输入时,什么都不会发生。当他们切换到单词时,我的应用程序实现了这一点,并捕获数据。请记住,我希望这与我们的合适(而不是可修改的)软件一起工作,所以我不能指望目标程序来协助这个过程。

我计划用VBscript或JavaScript编写。只有业余编码器。

我希望这是有道理的。打开建议!

回答

1
set service = GetObject ("winmgmts:") 

for each Process in Service.InstancesOf ("Win32_Process") 
    If Process.Name = "Progranametocheck.exe" then 
     wscript.echo "Progranametocheck is running" 
     wscript.quit 
    End If 
next 
wscript.echo "Progranametocheck is not running" 

上面的代码(VBScript)的检查是一个程序正在运行,使弹出uptelling你,如果它的运行与否。如果要在程序运行运行程序替换:“wscript.echo‘Progranametocheck运行’有:

Set objShell = Nothing 
Set objShell = WScript.CreateObject("WScript.Shell") 
objShell.Run("""C:\\dir\\logger.exe""") 
Set objShell = Nothing 

所以一起就变成:

set service = GetObject ("winmgmts:") 

for each Process in Service.InstancesOf ("Win32_Process") 
    If Process.Name = "Progranametocheck.exe" then 
     Set objShell = Nothing 
     Set objShell = WScript.CreateObject("WScript.Shell") 
     objShell.Run("""C:\\dir\\logger.exe""") 
     Set objShell = Nothing 
     wscript.quit 
    End If 
next 
wscript.echo "Progranametocheck is not running" 
相关问题