-1

I am new to python. I am writing an automation script to right click a text file and then click on a Context Menu Item. Here I am using win32api ans win32con. I am unable to locate a file using win32api.SetCursorPos((x,y)). Is there a way to set cursor on a file without specifying x,y co-ordinates?

user3190414
  • 113
  • 1
  • 6
  • 13
  • You should always try something yourself and post it. SO is not a free coding service. If anything you could mention what makes you think you could use it, surely there are some functions in the module that you could try. – Oliver Jul 28 '14 at 19:53

1 Answers1

1

I think, you should append your context menu in windows (by regedit or by menu) and call your script with the filename as argument.

check this : Add menu item to windows context menu only for specific filetype

You can then get it with sys.argv or use the optparse module

Community
  • 1
  • 1