實施或執行程式碼的步驟
A. 從 VB 腳本呼叫 Python 腳本。
我們應該有兩個腳本檔案。
在 VB 中我們應該要有:
ScriptStart("C:\\...\\testPy.PY")
在名為 testPy.PY 的 Python 腳本中:
dd.print("testVar")
B. 從 Python 腳本中呼叫 Python 腳本:
PY 1:檔案名printhellodef.PY
def PrintHello():
print("Hello")
PY 2-呼叫者:檔案名callprinthello.PY
import printhellodef
importlib.reload(printhellodef)
printhellodef.PrintHello()