感謝大大的回覆
我在對我要處理的文件做個詳細說明
1.文件檔中的替代文字位置是否固定?
Ans:固定的
2.文件檔行數是否固定?
Ans:固定的
我要處理的文件是一個程式的指令,因為有很多case重複同樣動作
所以只須修改指令中的case名稱,就可以連續執行,省下不少時間
下面是我貼出2大段的指令
(cx-gui-do cx-activate-item "MenuBar*ReadSubMenu*Case & Data...")
(cx-gui-do cx-set-text-entry "Select File*FilterText" "e:\fluent-case & data\paper\vibrating-plate-vertical-channel\2d-case\cased\cased-1\dm\*")
(cx-gui-do cx-activate-item "Select File*Apply")
(cx-gui-do cx-set-text-entry "Select File*Text" "caseD-1-DM-1-00661.cas")
(cx-gui-do cx-activate-item "Select File*OK")
(cx-gui-do cx-activate-item "NavigationPane*Frame1*PushButton19(Graphics and Animations)")
(cx-gui-do cx-activate-item "Graphics and Animations*Frame1*Table1*Frame7*ButtonBox7*PushButton1(Options)")
(cx-gui-do cx-set-toggle-button "Display Options*Frame4(Layout)*CheckButton1(Titles)" #t)
(cx-gui-do cx-activate-item "Display Options*Frame4(Layout)*CheckButton1(Titles)")
(cx-gui-do cx-set-list-selections "Display Options*Frame4(Layout)*DropDownList5(Colormap Alignment)" '( 3))
(cx-gui-do cx-activate-item "Display Options*Frame4(Layout)*DropDownList5(Colormap Alignment)")
(cx-gui-do cx-activate-item "Display Options*PanelButtons*PushButton1(Apply)")
(cx-gui-do cx-activate-item "Display Options*PanelButtons*PushButton2(Close)")
(cx-gui-do cx-activate-item "MenuBar*DisplayMenu*Views...")
(cx-gui-do cx-activate-item "Views*Frame2(Actions)*ButtonBox2(Actions)*PushButton6(Read)")
(cx-gui-do cx-set-text-entry "Select File*FilterText" "e:\fluent-case & data\paper\vibrating-plate-vertical-channel\2d-case\cased\*")
(cx-gui-do cx-activate-item "Select File*Apply")
(cx-gui-do cx-activate-item "MenuBar*ReadSubMenu*Case & Data...")
(cx-gui-do cx-set-text-entry "Select File*FilterText" "e:\fluent-case & data\paper\vibrating-plate-vertical-channel\2d-case\cased\cased-1\dm\*")
(cx-gui-do cx-activate-item "Select File*Apply")
(cx-gui-do cx-set-text-entry "Select File*Text" "caseD-1-DM-1-00661.cas")
(cx-gui-do cx-activate-item "Select File*OK")
(cx-gui-do cx-activate-item "NavigationPane*Frame1*PushButton19(Graphics and Animations)")
(cx-gui-do cx-activate-item "Graphics and Animations*Frame1*Table1*Frame7*ButtonBox7*PushButton1(Options)")
(cx-gui-do cx-set-toggle-button "Display Options*Frame4(Layout)*CheckButton1(Titles)" #t)
(cx-gui-do cx-activate-item "Display Options*Frame4(Layout)*CheckButton1(Titles)")
(cx-gui-do cx-set-list-selections "Display Options*Frame4(Layout)*DropDownList5(Colormap Alignment)" '( 3))
(cx-gui-do cx-activate-item "Display Options*Frame4(Layout)*DropDownList5(Colormap Alignment)")
(cx-gui-do cx-activate-item "Display Options*PanelButtons*PushButton1(Apply)")
(cx-gui-do cx-activate-item "Display Options*PanelButtons*PushButton2(Close)")
(cx-gui-do cx-activate-item "MenuBar*DisplayMenu*Views...")
(cx-gui-do cx-activate-item "Views*Frame2(Actions)*ButtonBox2(Actions)*PushButton6(Read)")
(cx-gui-do cx-set-text-entry "Select File*FilterText" "e:\fluent-case & data\paper\vibrating-plate-vertical-channel\2d-case\cased\*")
(cx-gui-do cx-activate-item "Select File*Apply")
我希望能把紅色的數字部分取代掉
第一個00661-->00662
下一個00661-->00663
一直重複動作
小弟對寫程式方面比較薄弱
希望各位高手能幫小弟解決這個問題
感激不盡
|