Reputation: 78683
Subject says it all but he background:
I want to trigger some TortoiseSVN action from a batch file? I suspect that I can do this by calling the right exe with the right args but I'd rather find a way to solve the more general problem of doing an arbitrary action.
Edit: The reason that I don't just use svn directly is that TortoiseSVN doesn't include a command line SVN client (e.i. there is no svn.exe on my computer at all). Also, it would dump it output the stdout and I want the GUI output.
Regarding the Right Click menu, besides a way to directly trigger a right click item, a way to take an arbitrary right click item and (more or less automatically) find out what command line to call would also be good enough. However a solution that amounts to "just find out what it does" is not as I already know how to go there.
I don't have any specific reason to believe this can be done, so if someone knows it can't be, that would be a valid answer as well.
Upvotes: 0
Views: 521
Reputation: 4379
Provided that you know how to make the file selected, SendKeys method of WSH can be used (Alt+F) to open File menu, where all context menu items are doubled. You can use the same method to get proper item choosen.
Unfortunately, WSH cannot simulate mouse.
Upvotes: 0
Reputation: 810
Now that's somewhat redundant. =) Tortoise wraps the svn command lines and you want to automate the tortoise UI actions ...
Is there any reason you wouldn't just write a batch file that said, oh:
svn update
For help with svn, just type:
svn help
or
svn help <command>
Upvotes: 1
Reputation: 103145
Seems to me as if you answered the question yourself. To trigger an arbitrary action will still require knowing something about the action. I am not sure that you will get any benefit from triggering a right click on a menu over calling the exe with the args in the first place.
Upvotes: 0