|
You are here: iOpus > iMacros > Support > IM Tutorial: Python Scripting
Tutorial: Python Scripting
Prerequisites: iMacros Scripting Edition
Goal: Use the iMacros Scripting Interface with Python instead of the Windows Scripting Host.
The iMacros Scripting Interface can use used from any programming or script language that can use ActiveX interfaces. The following example shows you how to call this interface from Python. The script initializes the Scripting Interface and calls a macro with name "DNS".
import win32com.client
def Hello():
import win32com.client
w=win32com.client.Dispatch("imacros")
w.iimInit("", 1)
w.iimPlay("DNS")
print w.iimGetLastMessage()
if __name__=='__main__':
Hello()
|
|