質問: mchains->getitemtext(item); wxdialog d(this, wxid_any, gettitle()); shuttlegui s(&d, eiscreating); s.starthorizontallay(wxcenter, false); { s.startstatic(wxt(""), false); // deliberately not translated (!) { s.setborder(20); s.addfixedtext(wxstring::format(_("applying '%s' to current project"), name.c_str())); } s.endstatic(); } s.endhorizontallay(); d.layout(); d.fit(); d.centeronscreen(); d.move(-1, 0); d.show(); hide(); wxwindowdisabler wd; gprefs->write(wxt("/batch/activechain"), name); mbatchcommands.readchain(name); if (!mbatchcommands.applychain()) { return; } }
回答: 私は自分のスクリプトをautohotkeyでロールすることにしました(少し不安定ですが、一度にいくつかのファイルを処理できます):settitlematchmode 2 #p::pause #x::exit #a:: direc = c:\documents and settings\test\my documents\myaups\ filelist = ; initialize to be blank. loop, %direc%*.aup filelist = %filelist%%a_loopfilename%`n loop, parse, filelist, `n { sleep 2500 run, "c:\program files\audacity 1.3 beta (unicode)\audacity.exe" sleep 2500 winwait, audacity, ifwinnotactive, audacity, , winactivate, audacity, winwaitactive, audacity, if a_loopfield = ; ignore the blank item at the end of the list. continue sleep 2500 send, {ctrldown}o{ctrlup} sleep 3000 winwait, select one or more audio files..., ifwinnotactive, select one or more audio files..., , winactivate, select one or more audio files..., winwaitactive, select one or more audio files..., sleep, 2800 send, %direc% sleep, 2600 send, {enter} sleep, 2600 send, %a_loopfield% ;filename from direc loop sleep, 2600 send, {enter} sleep, 4000 ifwinactive, warning - opening old project file { send, {enter} sleep, 1000 } sleep, 3800 ifwinactive, warning - orphan block file(s) { send {tab} sleep 1000 send {tab} sleep 1000 send, {enter} } sleep, 3000 send, {shiftdown}c{shiftup} ;first must set the keyboard shortcut in audacity to shift+c sleep, 3600 winwait, apply chain, ifwinnotactive, apply chain, , winactivate, apply chain, winwaitactive, apply chain, sleep 500 send, {tab}{enter} sleep 4000 loop ;wait till conversion finishes { if !winexist("apply chain") break ; terminate the loop else sleep 200 } sleep 3800 send, {ctrldown}q{ctrlup} ;exit audacity sleep, 3800 winwait, save changes?, ifwinnotactive, save changes?, , winactivate, save changes?, winwaitactive, save changes?, sleep 500 send, {tab}{enter} sleep 6500 } return