tags:

views:

5

answers:

0

i am trying following script to first send alt key to highlight file menu of bittorrent, then to send enter key to extend the file menu, sendkey up to highlight the exit in file menu and sendkey enter to exit the bittorrent programme but it is not working. please help

@echo off setlocal

REM The program to change focus to before sending the keystrokes. set program=bittorrent SendKeys.SendWait("%F");

set script=%temp%\keystrokes.vbs

if exist "%script%" del "%script%"

echo Set WshShell = WScript.CreateObject("WScript.Shell") >> "%script%"

echo WshShell.AppActivate "%program%" >> "%script%"

echo WScript.Sleep 1000 >> "%script%"

echo WshShell.Sendkeys "%" >> "%script%"

echo WshShell.Sendkeys "{Enter}" >> "%script%"

echo WshShell.Sendkeys "{UP}" >> "%script%"

echo WshShell.Sendkeys "{Enter}" >> "%script%"

call "%script%"

del "%script%"