1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
|
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'
' Copyright 2000, 2010 Oracle and/or its affiliates.
'
' OpenOffice.org - a multi-platform office productivity suite
'
' This file is part of OpenOffice.org.
'
' OpenOffice.org is free software: you can redistribute it and/or modify
' it under the terms of the GNU Lesser General Public License version 3
' only, as published by the Free Software Foundation.
'
' OpenOffice.org is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU Lesser General Public License version 3 for more details
' (a copy is included in the LICENSE file that accompanied this code).
'
' You should have received a copy of the GNU Lesser General Public License
' version 3 along with OpenOffice.org. If not, see
' <http://www.openoffice.org/license.html>
' for a copy of the LGPLv3 License.
'
'/************************************************************************
'*
'* Owner : wolfram.garten@sun.com
'*
'* short description :
'*
'*********************************************************************
' #1 tHtmlExport
' #1 tHtmlExport_Webcast
'\********************************************************************
testcase tHtmlExport
Dim Autor1 as string
Dim Adresse1 as string
Dim Liste(50) as string
dim i as integer
dim x as integer
dim sTemp as string
dim sFile as string
printlog "open 'tools->options' and set first/last name and email adress on the page 'StarOffice->UserData' "
ToolsOptions
hToolsOptions ("STAROFFICE","USERDATA")
VorName.SetText "Garfield"
ZuName.SetText "Peanuts"
EMail.SetText "recumbent@sun.com"
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
printlog "create directory if not exists and delete the content, if exists user\\work\\html\\ "
app.mkDir ((ConvertPath (gOfficePath + "user\work\html\"))
Liste(0) = 0
GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() )
if (KillFileList (Liste()) <> TRUE) then
for i = 1 to ListCount (Liste())
Warnlog "File Not deleted: " + i + ": '" + Liste(i) + "'"
next i
endif
printlog "open application "
Call hNewDocument
WaitSlot (3000)
'------------------ simple document --------------------
printlog "create a rectrangle "
hTextrahmenErstellen ("This is a test text",10,10,40,20)
WaitSlot (2000)
printlog "create another rectrangle "
hRechteckErstellen (50,50,70,70)
WaitSlot (3000)
'####################################
Printlog "test if no file is created, if dialog is canceld"
printlog "call 'File->Export'"
FileExport
Kontext "ExportierenDlg"
WaitSlot (1000)
gHTMLFilter = Dateityp.GetItemText(1)
Dateityp.Select(gHTMLFilter)
printlog "set Filename to 'user\\work\\html\\expo0.html' "
sFile = ConvertPath (gOfficePath + "user\work\html\expo0")
Dateiname.SetText sFile
WaitSlot (2000)
printlog "click button 'Save' "
Speichern.Click
WaitSlot (3000)
Kontext "Active"
if Active.Exists Then Active.Yes
'---------------------------------------------------------
printlog "now we are on the dialog -1- 'Assign design' "
Kontext "HTMLExport1"
printlog "click button 'Cancel' "
HTMLExport1.Cancel
WaitSlot (5000)
Liste(0) = 0
GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() )
WaitSlot (1000)
Printlog "used file name: " + sFile
if (ListCount (Liste()) > 0) then
warnlog "dialog for export was canceled, but file was created :-("
for i = 1 to ListCount (Liste())
Warnlog "File created: " + i + ": '" + Liste(i) + "'"
next i
KillFileList (Liste())
end if
'####################################
Printlog "'test if files are created"
printlog "call 'File->Export'"
FileExport
Kontext "ExportierenDlg"
WaitSlot (1000)
try
printlog "select Filetype 'HTML...' aka 'WebPage' "
Dateityp.Select gHTMLFilter
catch
errorlog " Filter not available :-( : '"+gHTMLFilter+"'"
Dateityp.Select 1
printlog "Selects the first entry - which should be html "
endcatch
WaitSlot (1000)
printlog "set Filename to 'user\\work\\html\\expo.html' "
sFile = ConvertPath (gOfficePath + "user\work\html\expo.html")
Dateiname.SetText sFile
WaitSlot (2000)
printlog "click button 'Save' "
Speichern.Click
WaitSlot (3000)
Kontext "Active"
if Active.Exists Then Active.Yes
'---------------------------------------------------------
Printlog "now we are on the dialog -1- 'Assign design' "
Kontext "HTMLExport1"
printlog "'New design' should be checked "
if (NeuesDesign.IsEnabled <> TRUE) then
warnlog "NewDesign is not enabled by default :-("
endif
printlog "click button 'Next >>' "
Weiter.Click
WaitSlot (1000)
Printlog "now we are on the dialog -2- 'Publication Type & Options' "
Kontext "HTMLExport2"
printlog "checkbox 'Standard HTML Format' is checked by default "
if (Standard.IsChecked <> TRUE) then
warnlog "Standard is not enabled by default :-("
Standard.Check
end if
printlog "checkbox 'Title Page' is checked by default "
if Not TitelseiteErzeugen.IsChecked Then
TitelSeiteErzeugen.Check
Warnlog "- 'create Titlepage' should be checked as default :-("
end if
if (gApplication = "IMPRESS") then
printlog "if application is impress: the checkbox 'Show notes' is enabled by default"
If (Notizenanzeigen.IsChecked <> TRUE) Then
warnlog "- 'Show notes' checked as default :-("
Notizenanzeigen.Check
end if
end if
printlog "click button 'Next >>' "
Weiter.Click
Printlog "now we are on the dialog -3- 'png/gif/jpeg & resolution & sound' "
Kontext "HTMLExport3"
printlog "checkbox 'PNG' is checked by default "
if (PNG.isChecked <> TRUE) then
warnlog "Save Graphic as 'PNG' is not checked as default :-("
PNG.Check
end if
printlog "Listbox compression '75%' is selected by default "
if (Kompressionswert.GetSelText <> "75%") then
warnlog "'Compression' should be '75%', but is: '" + Kompressionswert.GetSelText + "'"
Kompressionswert.Select "75%"
end if
printlog "checkbox 'low monitor resolution' is checked by default "
if (NiedrigeAufloesung.IsChecked <> TRUE)Then
warnlog "Monitor resolution 'low' is not selected as default :-("
NiedrigeAufloesung.Check
end if
printlog "checkbox 'export sounds' is checked by default "
if (KlaengeExportieren.IsChecked <> true) then
warnlog "'Export Sounds' is not checked as default :-("
KlaengeExportieren.Check
end if
printlog "click button 'Next >>' "
Weiter.Click
WaitSlot (1000)
Printlog "now we are on the dialog -4- 'Information for the title page' "
Kontext "HTMLExport4"
printlog "the names you entered in the options have to appeare here! "
sTemp = Autor.GetText
Autor1=Autor.GetText
if (sTemp <> "Garfield Peanuts") then
warnlog "Value for 'Author' is other than expected, should 'Garfield Peanuts', is: '"+sTemp+"'"
end if
sTemp = EMail.GetText
Adresse1=EMail.GetText
if (sTemp <> "recumbent@sun.com") then
warnlog "Value for 'Email' is other than expected, should be 'recumbent@sun.com', is: '"+sTemp+"'"
end if
printlog "set text in field 'your homepage' "
Homepage.SetText "mahler"
AdditionalInformation.SetText "QualityApprooved"
printlog "click button 'Next >>' "
Weiter.Click
WaitSlot (2000)
Printlog "now we are on the dialog -5- 'select button style' "
Kontext "HTMLExport5"
WaitSlot (5000)
printlog "checkbox 'Text only' should be checked by default "
if (NurText.ischecked <> TRUE) then
warnlog "'Text only' is not checked by default :-("
NurText.check
end if
printlog "click button 'Next >>' "
Weiter.Click
WaitSlot (1000)
printlog "now we are on the dialog -6- 'select color scheme' "
Kontext "HTMLExport6"
WaitSlot (2000)
' maybe check if colour dialog comes up ?! TBO
'Text
'Hyperlink
'AktiverLink
'GesichteterLink
'Hintergrund
printlog "'Apply color schemes from document' should be checked per default :-) "
if (FarbenAusDok.IsChecked <> TRUE) Then
warnlog "'Apply color schemes from document' should be checked per default :-("
FarbenAusDok.Check
end if
WaitSlot (2000)
printlog "click button 'Create' "
HTMLExport6.OK
WaitSlot (5000)
Printlog "now we are on the dialog -7- 'Name HTML Design' "
Kontext "HTMLDesign"
WaitSlot (1000)
Designname.SetText "Lem's Standard"
HTMLDesign.OK
WaitSlot (3000)
Kontext "active"
if active.exists (5) then
printlog " the name for this design already exists : '" + active.GetText+ "'"
active.yes
end if
printlog "check number and names of created files "
Printlog "used file name: '" + sFile + "'"
Liste(0) = 0
GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() )
WaitSlot (1000)
x = ListCount(Liste())
if gApplication = "DRAW" then
if (x <> "3") then
Warnlog "- Number of files is not correct, it should be:3 but it is: '" + x + "' - Draw"
for i=1 to x
printlog "("+i+"/"+x+"): '"+Liste(i)+"'"
next
end if
else
if (x <> "4") then
Warnlog "- Number of files is not correct, it should be:4 but it is: '" + x + "' - Impress"
for i=1 to x
printlog "("+i+"/"+x+"): '"+Liste(i)+"'"
next
end if
end if
printlog "check if fileextension is common - .htm or .html for all files the same "
Liste(0) = 0
GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.htm" , Liste() )
WaitSlot (1000)
x = ListCount(Liste())
Liste(0) = 0
GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.html" , Liste() )
WaitSlot (1000)
i = ListCount(Liste())
if ((x > 0) AND (i > 0)) Then
Warnlog " fileextension is different between HTML-files :-( (htm/html)"
Warnlog " htm : " + x
Warnlog " html: " + i
end if
'--------------------------------------------------------
Printlog "check if design is created in dialog"
WaitSlot (3000)
printlog "File->Export "
FileExport
Kontext "ExportierenDlg"
printlog "Set Filename to user\\work\\html\\expo.html "
Dateiname.SetText sFile
try
printlog "select Filetype 'HTML...' aka 'WebPage' "
Dateityp.Select gHTMLFilter
catch
errorlog " Filter not available :-( : '"+gHTMLFilter+"'"
endcatch
WaitSlot (1000)
printlog "click button 'save' "
Speichern.Click
WaitSlot (1000)
Kontext "Active"
' active about overwriting existing file
if Active.Exists Then Active.Yes
'---------------------------------------------------------
WaitSlot (1000)
Kontext "HTMLExport1"
WaitSlot (1000)
try
printlog "now 'existing design' is checkable -> check it "
ExistierendesDesign.Check
WaitSlot (3000)
printlog "there has to be 1 design in the list, select and delete it "
x = Designliste.GetItemCount
if (x <> 1) then
warnlog "there is an unexpected count on designs in the list, expected 1, but there are : '" + x + "'"
end if
Designliste.Select 1
sTemp = Designliste.GetSelText
if sTemp = "Lem's Standard" Then
Printlog "- Created design exists in list and will be deleted now"
WaitSlot (1000)
DesignLoeschen.Click
WaitSlot (2000)
else
Warnlog "- Created design does not appear in the list it is: '"+sTemp+"'"
end if
catch
Warnlog "- List could not be accessed"
endcatch
WaitSlot (5000)
HTMLExport1.OK
kontext "Active"
if Active.Exists then
Active.Yes
end if
Call hCloseDocument
Printlog "used file name: '" + sFile + "'"
' TBOTODO CHECK files contenet !
endcase 'tHtmlExport
'---------------------------------------------------------
testcase tHtmlExport_Webcast
Dim iWaitIndex as integer
Dim i as integer
Dim a as integer
Dim x as integer
dim Liste ( 200 ) as String
dim sFile as string
printlog "create directories if not exists and delete the content, if exists user\\work\\html\\[asp|perl]\\ "
app.mkDir (ConvertPath (gOfficePath + "user\work\html\asp\"))
app.mkDir (ConvertPath (gOfficePath + "user\work\html\perl\"))
Liste(0) = 0
GetFileList ((ConvertPath (gOfficePath + "user\work\html\asp\")), "*.*" , Liste() )
WaitSlot (1000)
if (KillFileList (Liste()) <> TRUE) then
for i = 1 to ListCount (Liste())
Warnlog "File Not deleted: " + i + ": '" + Liste(i) + "'"
next i
end if
Liste(0) = 0
GetFileList ((ConvertPath (gOfficePath + "user\work\html\perl\")), "*.*" , Liste() )
WaitSlot (1000)
if (KillFileList (Liste()) <> TRUE) then
for i = 1 to ListCount (Liste())
Warnlog "File Not deleted: " + i + ": '" + Liste(i) + "'"
next i
end if
printlog "File->Autopillot->Presentation... " '---------
FileAutopilotPresentation
Kontext "Active"
if Active.Exists(1) then
WarnlogActive.GetText
try
Active.OK
catch
Active.No
endcatch
goto endsub
end if
printlog "Page 1 of autopilot"
Kontext "AutopilotPraesentation1"
printlog "uncheck 'preview' "
Preview.Uncheck
printlog "click on button 'create' "
AutopilotPraesentation1.OK
WaitSlot (3000)
'************************************ Page 1
Printlog "create a presentation and save it for further references"
printlog "start creating the presentation now "'------------------------------
Printlog "- Create presentation"
printlog "select 'click to add title' with [TAB] and press [F2] to edit the placeholder title "
hTypeKeys "<TAB><F2>"
WaitSlot (2000)
Select Case Ucase(gApplication)
case "DRAW" : hMouseClick DocumentDraw,50,50
case "IMPRESS" : hMouseClick DocumentImpress,50,50
end select
WaitSlot (3000)
printlog "Type 'This is a test text', select it. "
hTextrahmenErstellen ("This is a test text",10,10,40,20)
EditSelectAll
Kontext "TextObjectbar"
if TextObjectbar.Exists <> TRUE then
ViewToolbarsTextFormatting
end if
WaitSlot (3000)
Kontext "TextObjectbar"
printlog "click 'bold text' in object toolbar "
Fett.Click
WaitSlot (2000)
printlog "press [esacpe][tab] to get out of edit mode and select the next placeholder "
hTypeKeys "<escape><TAB>"
WaitSlot (1000)
printlog "SlideShow->Effects "
SlideShowCustomAnimation
WaitSlot (1000)
Kontext "Tasks"
WaitSlot (1000)
EffectAdd.Click
printlog "Dialog 'Custom Animation' comes up "
kontext
printlog "Switch to TabPage: Entrance "
active.setPage(TabEntrance)
Kontext "TabEntrance"
if TabEntrance.Exists (5) then
WaitSlot (1000)
printlog "select effect 'ABC v' :-) "
Effects.Select(5)
printlog "select speed 'slow' -> first item in list "
Speed.Select 1
try
TabEntrance.Ok
catch
errorlog "SlideShowEffects wasnt closed as it should have been"
endcatch
if TabEntrance.Exists then
TabEntrance.Close
warnlog "TabEntrance.Ok didn't seem to close the dialog."
else
printlog "TabEntrance was closed as it should"
end if
kontext "Tasks"
end if
WaitSlot (3000)
printlog "activate grafik insert dialog by typing [return] "
InsertGraphicsFromFile
Kontext "GrafikEinfuegenDlg"
if GrafikEinfuegenDlg.Exists <> TRUE then
WaitSlot (1000)
end if
printlog "insert grafik: global\\input\\graf_inp\\borabora.jpg "
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\borabora.jpg")
WaitSlot (3000)
Oeffnen.Click
WaitSlot (2000)
printlog "select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder "
hTypeKeys "<TAB><F2>"
printlog "insert text and select the words by typing [strg a] "
hTypeKeys "Mecury<RETURN>Venus<RETURN>Earth<RETURN>Mars<RETURN>Jupiter<RETURN>Saturn<RETURN>Uranus<RETURN>Neptune<RETURN>Pluto"
EditSelectAll
WaitSlot (1000)
printlog "format->character "
FormatCharacter
WaitSlot (2000)
Kontext
Active.SetPage TabFont
Kontext "TabFont"
printlog "set font size to '18' on tabpage 'font' "
try
SizeWest.SetText "18"
catch
Size.SetText "18"
endcatch
printlog "click button OK "
TabFont.OK
WaitSlot (1000)
printlog "click 'bold text' in object toolbar "
Kontext "TextObjectbar"
try
usebindings
Fett.Click 'culprint
catch
warnlog "Objectbar 'Text' not available :-( / didn't change automatical!"
hTypeKeys "<escape><escape><escape><tab><tab><TAB>"
WaitSlot (1000)
hTypeKeys "<F2>"
hTypeKeys "<HOME>"
hTypeKeys "<SHIFT><END>"
Kontext "TextObjectbar"
try
usebindings
Fett.Click 'culprint
catch
warnlog "darn again TBO"
endcatch
endcatch
WaitSlot (2000)
printlog "SlideShow-> CustomAnimation "
SlideShowCustomAnimation
WaitSlot (1000)
Kontext "Tasks"
WaitSlot (1000)
EffectChange.Click
kontext
printlog "Switch to TabPage: Entrance "
active.setPage(TabEntrance)
kontext "TabEntrance"
Effects.TypeKeys "<DOWN>",8
Speed.Select 2
try
TabEntrance.Ok
catch
warnlog "select another effect, assign is not possible"
endcatch
'******************************** Page 2 Merkur
printlog "create a 2nd slide with: insert->slide "
InsertSlide
WaitSlot (2000)
hTypekeys "<Pagedown>"
WaitSlot (2000)
printlog "select 'click to add title' with [TAB] and press [F2] to edit the placeholder title "
hTypeKeys "<TAB><F2>"
WaitSlot (2000)
printlog "Type 'MERKUR', select it via Edit-Select All"
hTextrahmenErstellen ("MERKUR",10,10,60,30)
EditSelectAll
WaitSlot (2000)
printlog "click 'bold text' in object toolbar "
Kontext "TextObjectbar"
Fett.Click
WaitSlot (1000)
printlog "press [esacpe][tab][return] to get out of edit mode and select the next placeholder and activate grafik insert dialog "
' hTypeKeys "<escape><tab><return>"
hTypeKeys "<escape><tab>"
InsertGraphicsFromFile
WaitSlot (4000)
printlog "insert grafik: global\\input\\graf_inp\\borabora.jpg "
Kontext "GrafikEinfuegenDlg"
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\borabora.jpg")
WaitSlot (3000)
Oeffnen.Click
WaitSlot (2000)
printlog "select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder "
hTypeKeys "<TAB><F2>"
printlog "insert text and select the words by typing [strg a] "
WaitSlot (1000)
hTypeKeys "Reciprocal Mass *5972000<SHIFT RETURN>Mass (Erde=1) 0,0558<SHIFT RETURN>Mass in kg 3,30310<SHIFT RETURN>"
hTypeKeys "Equator-radius (km) 2440<SHIFT RETURN>Equator-radius (Erde=1)0,382<SHIFT RETURN>Middle density (kg/m^3) 5400<SHIFT RETURN>"
hTypeKeys "Gravity acceleration at the equator (m/s^2) 3,78<SHIFT RETURN>Flightvelocity at the equator (km/s) 4,3<SHIFT RETURN>Sidereal rotationtime 58,65 Tage<SHIFT RETURN>"
hTypeKeys "Bias of the equatorplane against the orbitplane 0><SHIFT RETURN>Time of circulation 88 days<SHIFT RETURN>Distance to the sun Sun (km) 58Mio.<SHIFT RETURN>Temperatur at the day 350C<SHIFT RETURN>"
hTypeKeys "Temperatur at night -170C<SHIFT RETURN>Diameter (km) 4800"
EditSelectAll
WaitSlot (1000)
printlog "format->character "
FormatCharacter
WaitSlot (2000)
Kontext
Active.SetPage TabFont
Kontext "TabFont"
printlog "set font size to '18' on tabpage 'font' "
try
SizeWest.SetText "16"
catch
Size.SetText "16"
endcatch
printlog "click button OK "
TabFont.OK
WaitSlot (2000)
printlog "click 'bold text' in object toolbar "
Kontext "TextObjectbar"
try
Fett.Click 'culprint
catch
warnlog "Objectbar 'Text' not available :-( / didn't change automatical!"
hTypeKeys "<escape><escape><escape><tab><tab><TAB>"
WaitSlot (1000)
hTypeKeys "<F2>"
hTypeKeys "<HOME>"
hTypeKeys "<SHIFT><END>"
Kontext "TextObjectbar"
try
Fett.Click 'culprint
catch
warnlog "darn again TBO"
endcatch
endcatch
WaitSlot (2000)
printlog "save file with impress filter : user\\work\\webcast.odp "
sFile = ConvertPath (gOfficePath + "user\work\webcast")
if (Dir (sFile + ".odp") <> "") then app.kill (sFile + ".odp")
WaitSlot (2000)
hFileSaveAsWithFilterKill ((sFile + ".odp") , "impress8" )
Printlog "saved presentation: " + sFile + ".odp"
'------------------------- Exportieren als ASP Web-Cast
Printlog "'export as webcast ASP"
printlog "File->SaveAs "
FileExport
WaitSlot (2000)
Kontext "ExportierenDlg"
try
printlog "select Filetype 'HTML...' aka 'WebPage' "
gHTMLFilter = Dateityp.GetItemText(1)
Dateityp.Select(gHTMLFilter)
catch
errorlog " Filter not available :-( : '"+gHTMLFilter+"'"
Dateityp.Select 1
printlog "Selects the first entry - which should be html "
endcatch
printlog "Set Filename to user\\work\\webcst_asp.html "
sFile = ConvertPath (gOfficePath + "user\work\html\asp\webcast.html")
Dateiname.SetText sFile
printlog "click button 'save' "
Speichern.Click
WaitSlot (5000)
Kontext "Active"' ????????? TBO
if Active.Exists (5) Then Active.Yes
WaitSlot (3000)
printlog "now we are on the dialog -1- 'Assign design' "
Kontext "HTMLExport1"
WaitSlot (2000)
printlog "click button 'Next >>' "
Weiter.Click
WaitSlot (2000)
printlog "now we are on the dialog -2- 'Publication Type & Options' "
Kontext "HTMLExport2"
WaitSlot (2000)
Printlog "check 'WebCast'"
WebCast.Check
WaitSlot (2000)
Printlog "check 'Active Server Pages (ASP)'"
ASP.Check
printlog "click button 'Next >>' "
Weiter.Click
printlog "now we are on the dialog -3- 'gif/jpeg & resolution & sound' "
Kontext "HTMLExport3"
WaitSlot (2000)
printlog "check Save graphics as 'GIF' "
Gif.Check
printlog "check 'Medium (monitor) Resolution' "
MittlereAufloesung.Check
WaitSlot (1000)
printlog "click button 'Create' "
HTMLExport3.OK
WaitSlot (2000)
printlog "now we are on the dialog -7- 'Name HTML Design' "
Kontext "HTMLDesign"
printlog "click button 'Do Not Save' "
if HTMLDesign.Exists Then HTMLDesign.Cancel
iWaitIndex = 0
do while HTMLDesign.Exists AND iWaitIndex < 30
WaitSlot (1000)
iWaitIndex = iWaitIndex + 1
loop
Printlog "- Check number of safed files"
Printlog "file saved: '" + sFile + "'"
Liste(0) = 0
GetFileList ((ConvertPath (gOfficePath + "user\work\html\asp\")), "*.*" , Liste() )
WaitSlot (1000)
x = ListCount(Liste())
if (x <> "11") Then
Warnlog "- Number of files is not correct, it should be:11 but it is: '" + x + "'"
for i=1 to x
printlog "("+i+"/"+x+"): '"+Liste(i)+"'"
next
end if
'------------------------- Exportieren als ASP Web-Cast
Printlog "export as webcast PERL"
Kontext "DocumentImpress"
WaitSlot (2000)
printlog "File->export "
FileExport
WaitSlot (2000)
Kontext "ExportierenDlg"
printlog "select Filetype 'HTML...' aka 'WebPage' "
try
Dateityp.Select gHTMLFilter
catch
errorlog " Filter not available :-( : '"+gHTMLFilter+"'"
Dateityp.Select 1 ' selects the first one just in case anything else is selected.
printlog "Selected " + Dateityp.GetSelText + " manually."
endcatch
WaitSlot (1000)
printlog "Set Filename to user\\work\\wbcst_p.html "
sFile = ConvertPath (gOfficePath + "user\work\html\perl\webcast")
Dateiname.SetText sFile
printlog "click button 'save' "
Speichern.Click
WaitSlot (2000)
Kontext "Active"
printlog "click button 'save' "
if Active.Exists Then Active.Yes
WaitSlot (2000)
printlog "now we are on the dialog -1- 'Assign design' "
Kontext "HTMLExport1"
WaitSlot (2000)
printlog "click button 'Next >>' "
Weiter.Click
WaitSlot (2000)
printlog "now we are on the dialog -2- 'Publication Type & Options' "
Kontext "HTMLExport2"
WaitSlot (2000)
Printlog "check 'WebCast'"
WebCast.Check
WaitSlot (2000)
Printlog "check 'Perl'"
PERL.Check
WaitSlot (1000)
printlog "'URL for listeners' "
printlog "URL for listeners compare to to TBO: "+BeamerURL.GetText
printlog "set 'URL for presentation' to 'wbcst_prl.html' "
PraesentationURL.SetText "wbcst_prl"
WaitSlot (1000)
printlog "set 'URL for perl scrips' to '/WebCast/cgi-bin/' "
ScriptURL.SetText "/WebCast/cgi-bin/"
printlog "presentation url? : "+ (gOfficePath + "/WebCast/cgi-bin/wbcst_prl")
WaitSlot (1000)
printlog "click button 'Next >>' "
Weiter.Click
WaitSlot (1000)
printlog "now we are on the dialog -3- 'gif/jpeg & resolution & sound' "
Kontext "HTMLExport3"
WaitSlot (1000)
printlog "check Save graphics as 'GIF' "
Gif.Check
printlog "check 'Medium (monitor) Resolution' "
MittlereAufloesung.Check
WaitSlot (3000)
printlog "click button 'Create' "
HTMLExport3.OK
WaitSlot (3000)
Kontext "HTMLDesign"
if HTMLDesign.Exists Then HTMLDesign.Cancel
Printlog "- Presentation saved and exported into both Webcast formats. all files can be found here: " + gOfficePath + "output\impress\web-cast\"
Printlog "file saved: '" + sFile + ".html'"
WaitSlot (10000)
Liste(0) = 0
GetFileList ((ConvertPath (gOfficePath + "user\work\html\perl\")), "*.*" , Liste() )
x = ListCount(Liste())
if (x <> "12") Then
Warnlog "- Number of files is not correct, it should be:5 but it is: '" + x + "'"
for i=1 to x
printlog "("+i+"/"+x+"): '"+Liste(i)+"'"
next
end if
Call hCloseDocument
' TBO: TODO FILECHECK IF EXISTS
endcase 'tHtmlExport_Webcast
|