Warning, /multimedia/kwave/scripts/screenshots.kwave is written in an unsupported language. File is not indexed.

0001 #############################################################################
0002 ##    scripts/screenshots.kwave - script for making screenshot for ${LANG}
0003 ##                           -------------------
0004 ##    begin                : Sat Feb 21 2015
0005 ##    copyright            : (C) 2015 by Thomas Eschenbacher
0006 ##    email                : Thomas.Eschenbacher@gmx.de
0007 #############################################################################
0008 #
0009 #############################################################################
0010 ##                                                                          #
0011 ##    This program is free software; you can redistribute it and/or modify  #
0012 ##    it under the terms of the GNU General Public License as published by  #
0013 ##    the Free Software Foundation; either version 2 of the License, or     #
0014 ##    (at your option) any later version.                                   #
0015 ##                                                                          #
0016 #############################################################################
0017 
0018 #
0019 # open the example wav file
0020 # hint: this file is generated from samples/sample.opus by applying
0021 #       scripts/create-testfile.kwave
0022 #
0023 open(/var/tmp/example.wav)
0024 
0025     #
0026     # screenshot of MDI mode
0027     #
0028 main-mdi:
0029     window:resize(Kwave::TopWidget,900, 600)
0030     select_gui_type(MDI)
0031 
0032     # first sub window: test.ogg (foreground)
0033     view:zoom_all()
0034     selectnone()
0035     selectnextlabels()
0036     selectnextlabels()
0037     fileinfo(Filename, test.ogg)
0038 
0039     # second sub window: sample.flac (minimized)
0040     open(/var/tmp/example.wav)
0041     view:zoom_all()
0042     fileinfo(Filename, sample.flac)
0043     window:minimize()
0044 
0045     # third sub window: example.wav (background)
0046     open(/var/tmp/example.wav)
0047     fileinfo(Filename, example.wav)
0048     delete_track(0)
0049     view:zoom_all()
0050     selectnone()
0051     window:next_sub()
0052     window:resize(Kwave::TopWidget,900, 640)
0053     delayed(500,window:screenshot(Kwave::TopWidget, /var/tmp/screenshots/${LANG}/kwave-gui-mdi.png))
0054     sync()
0055 
0056     #
0057     # screenshot of TAB mode
0058     #
0059 main-tab:
0060     select_gui_type(TAB)
0061     window:next_sub()
0062     selectnone()
0063     selectnextlabels()
0064     selectnextlabels()
0065     delayed(500,window:screenshot(Kwave::TopWidget, /var/tmp/screenshots/${LANG}/kwave-gui-tab.png))
0066     sync()
0067     undo_all()
0068     close()
0069     undo_all()
0070     close()
0071     undo_all()
0072 
0073     #
0074     # screenshots of SDI mode
0075     #
0076 main-sdi:
0077     select_gui_type(SDI)
0078     sync()
0079 
0080     # first sub window: sample.flac (background)
0081     window:resize(Kwave::TopWidget,820, 440)
0082     fileinfo(Filename, sample.flac)
0083     selectnone()
0084     selectnextlabels()
0085     selectnextlabels()
0086     view:zoom_selection()
0087     selectnone()
0088     delayed(500,window:screenshot(Kwave::TopWidget, /var/tmp/screenshots/${LANG}/01-kwave-gui-sdi.png))
0089     sync()
0090     undo_all()
0091 
0092     # second sub window: test.ogg (middle)
0093     fileinfo(Filename, test.ogg)
0094     view:zoom_all()
0095     delete_track(0)
0096     selectnone()
0097     view:zoom_in()
0098     delayed(500,window:screenshot(Kwave::TopWidget, /var/tmp/screenshots/${LANG}/02-kwave-gui-sdi.png))
0099     sync()
0100     undo_all()
0101 
0102     # third window: example.wav (foreground)
0103     fileinfo(Filename, example.wav)
0104     view:zoom_all()
0105     selectnone()
0106     selectnextlabels()
0107     selectnextlabels()
0108     delayed(500,window:mousemove(Kwave::TrackView,350,80))
0109     delayed(500,window:screenshot(Kwave::TopWidget, /var/tmp/screenshots/${LANG}/03-kwave-gui-sdi.png))
0110     sync()
0111     undo_all()
0112 
0113 #
0114 # main screen, one single file, SDI mode
0115 #
0116 main:
0117     select_gui_type(SDI)
0118     window:resize(Kwave::TopWidget,900, 640)
0119     view:zoom_all()
0120     plugin:execute(selectrange,2,2,25,10)
0121     expandtolabel()
0122     delayed(1000,window:mousemove(Kwave::TrackView,350,80))
0123     delayed(1000,window:screenshot(Kwave::TopWidget, /var/tmp/screenshots/${LANG}/kwave-main.png))
0124     sync()
0125 
0126 #
0127 # screenshot of the Edit Label dialog
0128 #
0129 edit-label:
0130     delayed(1000,window:screenshot(Kwave::LabelPropertiesWidget, /var/tmp/screenshots/${LANG}/kwave-edit-label.png))
0131     delayed(100,window:close(Kwave::LabelPropertiesWidget))
0132     label:edit(0)
0133     sync()
0134 
0135 #
0136 # screenshot of the Help/About dialog
0137 #
0138 plugin-about:
0139     delayed(2000,window:screenshot(Kwave::AboutDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-about.png))
0140     delayed(100,window:close(Kwave::AboutDialog))
0141     plugin:execute(about)
0142 
0143 #
0144 # screenshot of the AmplifyFree dialog
0145 #
0146 plugin-amplifyfree:
0147     selectall()
0148     delayed(1000,window:resize(Kwave::AmplifyFreeDialog, 400, 300))
0149     delayed(500,window:click(Kwave::CurveWidget, 120, 50))
0150     delayed(500,window:screenshot(Kwave::AmplifyFreeDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-amplifyfree.png))
0151     delayed(100,window:close(Kwave::AmplifyFreeDialog))
0152     plugin:setup(amplifyfree,Amplify Free,spline,0,0,0.68,0.47,1,1)
0153     sync()
0154 
0155 #
0156 # screenshot of the BandPass dialog
0157 #
0158 plugin-band_pass:
0159     selectall()
0160     delayed(500,window:screenshot(Kwave::BandPassDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-band_pass.png))
0161     delayed(100,window:close(Kwave::BandPassDialog))
0162     plugin:setup(band_pass,1337,1971)
0163     sync()
0164 
0165 #
0166 # screenshot of the MP3 codec setup dialog
0167 #
0168 plugin-codec_mp3:
0169     selectall()
0170     delayed(500,window:screenshot(Kwave::MP3EncoderDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-codec_mp3.png))
0171     delayed(100,window:close(Kwave::MP3EncoderDialog))
0172     plugin:setup(codec_mp3)
0173     sync()
0174 
0175 #
0176 # screenshot of the K3b export setup dialog
0177 #
0178 plugin-export_k3b:
0179     selectall()
0180     select_track:off(1)
0181     delayed(500,window:screenshot(Kwave::K3BExportDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-export_k3b.png))
0182     delayed(100,window:close(Kwave::K3BExportDialog))
0183     plugin:setup(export_k3b)
0184     sync()
0185     select_track:on(1)
0186 
0187 #
0188 # screenshot of the File Info dialog
0189 #
0190 plugin-fileinfo:
0191     delayed(1000,window:screenshot(Kwave::FileInfoDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-fileinfo.png))
0192     delayed(100,window:close(Kwave::FileInfoDialog))
0193     plugin:setup(fileinfo)
0194     sync()
0195 
0196 #
0197 # screenshot of the Goto plugin
0198 #
0199 plugin-goto:
0200     delayed(1000,window:screenshot(Kwave::GotoDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-goto.png))
0201     delayed(100,window:close(Kwave::GotoDialog))
0202     plugin:setup(goto, 2, 42)
0203     sync()
0204 
0205 #
0206 # screenshot of the Insert At plugin
0207 #
0208 plugin-insert_at:
0209     delayed(1000,window:screenshot(Kwave::GotoDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-insert_at.png))
0210     delayed(100,window:close(Kwave::GotoDialog))
0211     plugin:setup(insert_at, 2, 42)
0212     sync()
0213 
0214 #
0215 # screenshot of the Low Pass dialog
0216 #
0217 plugin-lowpass:
0218     selectall()
0219     delayed(1000,window:screenshot(Kwave::LowPassDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-lowpass.png))
0220     delayed(100,window:close(Kwave::LowPassDialog))
0221     plugin:setup(lowpass, 2342)
0222     sync()
0223 
0224 #
0225 # screenshot of the Noise Generator dialog
0226 #
0227 plugin-noise:
0228     selectall()
0229     delayed(1000,window:screenshot(Kwave::NoiseDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-noise.png))
0230     delayed(100,window:close(Kwave::NoiseDialog))
0231     plugin:setup(noise, 0.22, 1)
0232     sync()
0233 
0234 #
0235 # screenshot of the Memory Setup dialog
0236 #
0237 plugin-memory:
0238     delayed(1000,window:screenshot(Kwave::MemoryDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-memory.png))
0239     delayed(100,window:close(Kwave::MemoryDialog))
0240     plugin:setup(memory, 1,1024,1,1,512,/var/tmp,512)
0241     sync()
0242 
0243 #
0244 # screenshot of the New File dialog
0245 #
0246 plugin-newsignal:
0247     delayed(1000,window:screenshot(Kwave::NewSignalDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-newsignal.png))
0248     delayed(100,window:close(Kwave::NewSignalDialog))
0249     plugin:setup(newsignal, 3660300, 44100, 16, 2, 1)
0250     sync()
0251 
0252 #
0253 # screenshot of the Notch Filter dialog
0254 #
0255 plugin-notch_filter:
0256     selectall()
0257     delayed(1000,window:screenshot(Kwave::NotchFilterDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-notch_filter.png))
0258     delayed(100,window:close(Kwave::NotchFilterDialog))
0259     plugin:setup(notch_filter, 880, 230)
0260     sync()
0261 
0262 #
0263 # screenshot of the Pitch Shift dialog
0264 #
0265 plugin-pitch_shift:
0266     selectall()
0267     delayed(1000,window:screenshot(Kwave::PitchShiftDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-pitch_shift.png))
0268     delayed(100,window:close(Kwave::PitchShiftDialog))
0269     plugin:setup(pitch_shift,1.23, 4, 1)
0270     sync()
0271 
0272 #
0273 # screenshot of the Playback Setup dialog
0274 #
0275 plugin-playback:
0276     delayed(1000,window:screenshot(Kwave::PlayBackDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-playback.png))
0277     delayed(100,window:close(Kwave::PlayBackDialog))
0278     plugin:setup(playback, 2,"null sink|sound_card||Null Output|sound_note",2,0,16)
0279     sync()
0280 
0281 #
0282 # screenshot of the Record dialog
0283 #
0284 plugin-record:
0285     delayed(1000,window:screenshot(Kwave::RecordDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-record.png))
0286     delayed(100,window:close(Kwave::RecordDialog))
0287     plugin:setup(record,2,1,20,1,300,0,2015-02-22T08:43:00,1,30,0,3,0,50,0,5,0,5,DSNOOP-Plugin|sound_note,2,44100,0,16,401,64,12)
0288     sync()
0289 
0290 #
0291 # screenshot of the Save Blocks dialog
0292 #
0293 plugin-saveblocks:
0294     selectnone()
0295     fileinfo(Filename, example.wav)
0296     selectnone()
0297     delayed(1500,window:screenshot(Kwave::SaveBlocksDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-saveblocks.png))
0298     delayed(100,window:close(Kwave::SaveBlocksDialog))
0299     plugin:setup(saveblocks,/var/tmp/screenshots/example.wav,[\%filename\]\-\[\%04nr\],0,1)
0300     sync()
0301 
0302 #
0303 # screenshot of the Select Range dialog
0304 #
0305 plugin-selectrange:
0306     plugin:execute(selectrange,2,2,42,11)
0307     fileinfo(Filename, example.wav)
0308     delayed(1500,window:screenshot(Kwave::SelectRangeDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-selectrange.png))
0309     delayed(100,window:close(Kwave::SelectRangeDialog))
0310     plugin:setup(selectrange,2,2,42,11)
0311     sync()
0312 
0313 #
0314 # screenshot of the Sonagram window
0315 #
0316 plugin-sonagram:
0317     plugin:execute(selectrange,2,2,33,10)
0318     expandtolabel()
0319     select_track:none()
0320     select_track:on(0)
0321     plugin:execute(sonagram, 1024, hamming, 1, 1, 0)
0322     delayed(2000,window:click(Kwave::ImageView, 396, 259))
0323     delayed(100,window:screenshot(Kwave::SonagramWindow, /var/tmp/screenshots/${LANG}/kwave-plugin-sonagram-window.png))
0324     delayed(100,window:sendkey(Kwave::SonagramWindow, Ctrl+W))
0325     sync()
0326 
0327 #
0328 # screenshot of the Sonagram dialog
0329 #
0330 plugin-sonagram-setup:
0331     plugin:execute(selectrange,2,2,33,10)
0332     expandtolabel()
0333     select_track:none()
0334     select_track:on(0)
0335     delayed(1000,window:screenshot(Kwave::SonagramDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-sonagram-setup.png))
0336     delayed(100,window:close(Kwave::SonagramDialog))
0337     plugin:setup(sonagram, 1024, hamming, 1, 1, 0)
0338     sync()
0339 
0340 #
0341 # screenshot of the String Enter dialog
0342 #
0343 plugin-stringenter:
0344     delayed(1000,window:screenshot(Kwave::StringEnterDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-stringenter.png))
0345     delayed(100,window:close(Kwave::StringEnterDialog))
0346     plugin:setup(stringenter, help\(\))
0347     sync()
0348 
0349 #
0350 # screenshot of the Volume dialog
0351 #
0352 plugin-volume:
0353     selectall()
0354     select_track:all()
0355     delayed(1000,window:screenshot(Kwave::VolumeDialog, /var/tmp/screenshots/${LANG}/kwave-plugin-volume.png))
0356     delayed(100,window:close(Kwave::VolumeDialog))
0357     plugin:setup(volume, 0.707946, 2)
0358     sync()
0359 
0360 end:
0361 
0362 selectnone()
0363 close()
0364 quit()
0365 
0366 # Hint: sometimes useful to find out the class name of a window
0367 #       delayed(1000,plugin:setup(debug,dump_windows))
0368 
0369 ### EOF ###