Saved Bookmarks
| 1. |
Solve : batch file for tool which does not have a CLI? |
|
Answer» HI, I wanted to know if we can have a batch script SET up for a software which does not support CLI.Depends on what you want to do with the software - you can run most programs from a command LINE, what else would you want to do?I'm using a VERSION of clearcase which does not support CLI. So, I wanted to know if I can capture a few actions (for ex: I click on 'Environment menu', then click 'connect' & then enter the user id & pw). Is there a way we can put such tasks into a batch file (using some other tool or windows scripts)?Yes, there are keyboard macro programs that can automate most of the task if it is a simple set of slow key press things. Even mouse clicks are possible. I think on Google they are called "Keyboard Automation" and are used when a program does not have full CLI stuff. Here is one that you might try. I don't know if it will work for you, but it has a free offer. http://www.autohotkey.com/hey, i tried with a few tools like AutoIt3, AutoHotkey, Macro ToolsWorks. but. it did n't work for me. it's recording, but at some points it's not catching the mouse movements... anyway, i'll try with some more... thanks for the 'key word - Keyboard Automation. i was not at all getting anything in google before! I did not mean to waste you time. I just thought that maybe you would be happy with a free product. Here is the industrial strength product. It will blow you away. I t can 'learn what a program wants and can find the places where things have to have a check Boxes. And other amazing things. It has the power to store hundreds of scripst, and each sript can have replacement parameters. Most of the things you wold like to do in a command line if yu could. http://www.keytext.com/ you can use vbscript SendKeys. Below is just an example of opening notepad, copy EVERYTHING to clipboard and paste to another file. similarly , you can call your clearcase application and do the same, simulating key strokes send to the application. Code: [Select]set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "notepad c:\test\file.txt" WScript.Sleep 100 WshShell.AppActivate "Notepad" WScript.Sleep 100 WshShell.SendKeys "^{a}" WScript.Sleep 500 WshShell.SendKeys "^{c}" WScript.Sleep 500 WshShell.SendKeys "%{F4}" WScript.Sleep 500 WshShell.Run "write c:\test\file2.txt" WScript.Sleep 500 WshShell.AppActivate "Writer" WScript.Sleep 500 WshShell.SendKeys "^{a}" WScript.Sleep 500 WshShell.SendKeys "^{v}" WScript.Sleep 500 WshShell.SendKeys "^{s}" WScript.Sleep 500 |
|