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 파일이 있는 폴더