Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4456

    leo_zzz
    Participant

    I want to use Python as my Macro scripting language, I did as Macro reference told:
    #language = “Python”
    Window.document.write( ‘Hello’ );

    but it failed with “Python specified language not registered in this system”, but I have already installed the Python in my system, could anyone tell me what special action should I take to make the Python scripting works?

    #4457

    Vlad
    Member

    If you installed official Python distribution from http://www.python.org you should also install Python for Windows extensions:
    home page: http://starship.python.net/crew/mhammond/win32/
    download page: http://sourceforge.net/project/showfiles.php?group_id=78018

    Make sure to select installer version corresponding to your Python version, that is pywin32-210.win32-py2.5.exe if you have Python 2.5.x

    If everything was installed correctly you should be able to run this python script:

    import win32api
    import win32com.client
    WshShell = win32com.client.Dispatch(‘WScript.Shell’)
    WshShell.Run(‘notepad.exe’)
    win32api.Sleep(1000)
    WshShell.SendKeys( ‘everything is ok{ENTER}’ )

    #4458

    leo_zzz
    Participant

    it works !
    thanks a lot, man:)

    #9902

    ArthurZ
    Participant

    I am also interested in writing macros in Python
    Did this question get resolved?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Share with friends... Tweet about this on TwitterShare on FacebookShare on Google+Email this to someone