This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# # 海期報價及下單範例 | |
import pythoncom | |
import asyncio | |
import datetime | |
import pandas as pd | |
import comtypes.client as cc | |
# 只有第一次使用 api ,或是更新 api 版本時,才需要呼叫 GetModule | |
# 會將 SKCOM api 包裝成 python 可用的 package ,並存放在 comtypes.gen 資料夾下 | |
# 更新 api 版本時,記得將 comtypes.gen 資料夾 SKCOMLib 相關檔案刪除,再重新呼叫 GetModule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from comtypes.client import CreateObject, GetEvents | |
import comtypes.gen.SKCOMLib as sk | |
import pythoncom | |
import asyncio | |
# 建立物件, 登錄物件, 回報物件 | |
skC = CreateObject(sk.SKCenterLib, interface=sk.ISKCenterLib) | |
skR = CreateObject(sk.SKReplyLib , interface=sk.ISKReplyLib) | |
# 輸入身分證與密碼 |