From ba29501ed6daac5a4064d3eb75313e000e010af6 Mon Sep 17 00:00:00 2001 From: gzero-ser7 Date: Thu, 16 Jan 2025 16:25:12 +0900 Subject: [PATCH] =?UTF-8?q?hwp->hwpml=20=EB=B3=80=ED=99=98=20=EC=8B=9C=20?= =?UTF-8?q?=EC=B0=A8=ED=8A=B8=20=EB=B3=80=ED=99=98=20=EA=B8=B0=EB=8A=A5?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=B0=A8=ED=8A=B8=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=ED=9B=84=20=ED=8C=8C=EC=9D=BC=20=EC=A0=80=EC=9E=A5(=ED=8C=9D?= =?UTF-8?q?=EC=97=85=20=ED=81=B4=EB=A6=AD=20=ED=95=84=EC=9A=94)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index 4f5f0ee..7f0f0c8 100644 --- a/test.py +++ b/test.py @@ -66,6 +66,23 @@ def convert_hwp_to_xml(input_folder, output_folder): try: # 파일 열기 hwp.Open(str(hwp_file), "HWP") + + #hwpactionid 기반 + hwp.Run("MoveDocBegin") + hwp.Run("SelectCtrlFront") + + while True: + curr = hwp.KeyIndicator() + print(curr[-1]) + hwp.Run("SelectCtrlFront") + hwp.SetMessageBoxMode(0x111111) + hwp.Run("VtChartConverter") + + next = hwp.KeyIndicator() + if next == curr: + break + + hwp.SetMessageBoxMode(0x0000F0) #메시지 박스 원래대로 # XML 파일 경로 설정 xml_filename = hwp_file.stem + ".hml" @@ -113,8 +130,8 @@ if __name__ == "__main__": # output_folder = r"C:\Users\dra\project\HWP-Scoring\output" # XML 파일을 저장할 폴더 # 변환할 폴더 경로 설정 - input_folder = r"C:\Users\gzero-ser7-win11\source\repos\hwpTest\input" # HWP 파일이 있는 폴더 - output_folder = r"C:\Users\gzero-ser7-win11\source\repos\hwpTest\output" # XML 파일을 저장할 폴더 + input_folder = r"C:\Users\gzero-ser7-win11\Project\KAIT\hwpTest\input" # HWP 파일이 있는 폴더 + output_folder = r"C:\Users\gzero-ser7-win11\Project\KAIT\hwpTest\output" # XML 파일을 저장할 폴더 # output_folder = r"\hwp-output" # HWP 파일이 있는 폴더