Python

From iMacros
Jump to: navigation, search

The iMacros Scripting Interface can be used from any programming or script language that can use the standard Windows COM object interfaces. The following example shows you how to call this interface from Python. The script initializes the Scripting Interface and calls the demo macro "FillForm".

import win32com.client
def Hello():
 import win32com.client
 w=win32com.client.Dispatch("imacros")
 w.iimInit("", 1)
 w.iimPlay("Demo\\FillForm")
if __name__=='__main__':
 Hello()

Note: You need to install the Python Extensions for Windows for Windows COM support (module win32com.client).