Update default theme to use features in FVWM 2.5.25+
[fvwm-themes.git] / scripts / FvwmScript-ColorSelector
blob36002ab2553ee1b1df29e0cdfd847180f073ec24
1 WindowTitle {Color Selector}
2 WindowSize 316 280
3 Font    -adobe-helvetica-bold-r-*-*-12-*
5 Init
6 Begin
7     Set $Lang = {}
8     Set $Color = {}
9     Set $Launched = 0
10     Set $return = {}
11     # Arguments
12     Set $i = 1
13     Set $arg = (GetScriptArgument $i)
14     While $arg <> {} Do
15     Begin
16         Set $j = (Add $i 1)
17         If $arg == {--viewer-colorset} Then
18             Set $ViewerColorset = (GetScriptArgument $j)
19         If $arg == {--launched} Then
20             Set $Launched = (GetScriptArgument $j)
21         If $arg == {--lang} Then
22             Set $Lang = (GetScriptArgument $j)
23         If $arg == {--color} Then
24             Set $Color = (GetScriptArgument $j)
25         Set $i = (Add $i 2)
26         Set $arg = (GetScriptArgument $i)
27     End
29     Set $SelFont = {-adobe-helvetica-bold-r-*-*-12-*}
30     Set $ShadeFont = {-adobe-helvetica-medium-r-*-*-12-*}
31     Set $SaveFont = {Sel}
32     Set $nonDefaultFont = 0
34     #Set $Lang = {en}
35     #Set $Lang = {ru}
36     # ------------------------------------- Internationalization.
37     Set $DocLoaded = 0
38     Set $nonDefaultFont = 0
40     If $Lang == {} Then
41     Begin
42         Set $cmd = {echo "$LANG" | cut -c1-2}
43         Set $Lang = (GetOutput $cmd 1 -1)
44         Set $localeSet = 1
45     End
46     If $Lang == {} Then
47         Set $Lang = {C}
49     Set $msg = {}
50     Set $id = {}
51     Set $cmd = {fvwm-themes-script --get-msg }FvwmScript-ColorSelector{ --lang }$Lang
52     Set $MSG = (GetOutput $cmd 1 -1)
53     Set $index = 0
54     Set $notdone = 1
55     While $notdone == 1 Do
56     Begin
57         Set $index = (Add $index 1)
58         Set $id = (StrCopy $MSG $index (Add $index 11))
59         Set $index = (Add $index 12)
60         Set $tmp = (StrCopy $MSG $index (Add $index 3))
61         Set $index = (Add $index 4)
62         Set $pos = (Add $index $tmp)
63         Set $msg = (StrCopy $MSG $index $pos)
64         Set $index = (Add $index $tmp)
65         #Do {Echo id:}$id{:msg:}$msg{:}
67         If $index > 9999 Then
68             Set $notdone = 0
69         If $id == {END         } Then
70             Set $notdone = 0
71         If $id == {} Then
72             Set $notdone = 0
73         # TS
74         If $id == {Title       } Then
75             ChangeTitle 1 $msg
76         If $id == {SelColor    } Then
77             ChangeTitle 14 $msg
78         If $id == {Help        } Then
79             ChangeTitle 993 $msg
80         If $id == {Ok          } Then
81         Begin
82             ChangeTitle 992 $msg
83         End
84         If $id == {Cancel      } Then
85             ChangeTitle 994 $msg
86         If $id == {ChangeFont  } Then
87             Set $nonDefaultFont = $msg
88         If $id == {SelFont     } Then
89             Set $SelFont = $msg
90         If $id == {ShadeFont   } Then
91             Set $ShadeFont = $msg
92         If $id == {FixedFont   } Then
93             Set $FixedFont = $msg
94     End
96     If $nonDefaultFont == 1 Then
97     Begin
98         ChangeFont 1 $SelFont
99         ChangeFont 14 $SelFont
100         # these 4 one display number
101         ChangeFont 17 $FixedFont
102         ChangeFont 30 $FixedFont
103         ChangeFont 32 $FixedFont
104         ChangeFont 34 $FixedFont
105         ChangeFont 992 $SelFont
106         ChangeFont 993 $SelFont
107         ChangeFont 994 $SelFont
108         # when the doc will be written
109         #ChangeFont 994 $FixedFont
110     End
112     # ---------------------- Color init
114     Set $cmd = {echo "$FT_DATADIR"}
115     Set $FtDataDir = (GetOutput $cmd 1 -1)
116     Set $RainbowFile = $FtDataDir{/images/fvwmscript/palette-rainbow.xpm}
117     Set $GreyFile    = $FtDataDir{/images/fvwmscript/palette-gray.xpm}
119     # get the rainbow color line
120     Set $cmd = {if [ -f }$RainbowFile{ ]; then echo 1; else echo "0"; fi}
121     Set $test = (GetOutput $cmd 1 -1)
122     If $test == {0} Then
123     Begin
124         Do {Echo [FvwmScript-ColorSelector] Unable to find }$RainbowFile
125         Do {Echo [FvwmScript-ColorSelector] exiting!}
126         Quit
127     End
128     Else
129     Begin
130         Set $cmd = {cat }$RainbowFile
131         Set $ColorLine = (GetOutput $cmd 282 -1)
132     End
134     # get the grey color line
135     Set $cmd = {if [ -f }$GreyFile{ ]; then echo "1"; else echo "0"; fi}
136     Set $test = (GetOutput $cmd 1 -1)
137     If $test == {0} Then
138     Begin
139         Do {Echo [FvwmScript-ColorSelector] Unable to find }$GreyFile
140         Do {Echo [FvwmScript-ColorSelector] exiting!}
141         Quit
142     End
143     Else
144     Begin
145         Set $cmd = {cat }$GreyFile
146         Set $GreyColorLine = (GetOutput $cmd 282 -1)
147     End
149     If $Color <> {} Then
150         Set $CurrentColor = $Color
151     Else
152         Set $CurrentColor = {#02EEFF}
154     Set $UpdateColors = 1
155     Set $IsSecond = 0
156     Do {Colorset 29 fg black, bg #908090, HGradient 190 2 #000000 50 }$CurrentColor{ 50 #ffffff, NoShape}
157     Set $LightColor = $CurrentColor
158     Set $LightNumRed = (HexToNum (StrCopy $LightColor 2 3))
159     Set $LightNumGreen = (HexToNum (StrCopy $LightColor 4 5))
160     Set $LightNumBlue = (HexToNum (StrCopy $LightColor 6 7))
163 #----------------------------------------------------------------------------
165 PeriodicTasks
166 Begin
167     
168     If $UpdateColors == 1 Then
169     Begin
170         Set $UpdateColors = 0
171         ChangeBackColor 15 $CurrentColor
172         ChangeTitle 17 $CurrentColor
173         Set $Red = (StrCopy $CurrentColor 2 3)
174         Set $Green = (StrCopy $CurrentColor 4 5)
175         Set $Blue = (StrCopy $CurrentColor 6 7)
176         Set $NumRed = (HexToNum $Red)
177         Set $NumGreen = (HexToNum $Green)
178         Set $NumBlue = (HexToNum $Blue)
179         Set $NumR = $NumRed
180         Set $NumG = $NumGreen
181         Set $NumB = $NumBlue
182         Set $t ={R: } $Red
183         ChangeTitle 30 $t
184         ChangeValue 31 $NumRed
185         Set $t ={G: } $Green
186         ChangeTitle 32 $t
187         ChangeValue 33 $NumGreen
188         Set $t ={B: } $Blue
189         ChangeTitle 34 $t
190         ChangeValue 35 $NumBlue
191     End
195 # ----------------------------------------------------------------------------
197 # Title
198 Widget 1
199 Property
200     Flags NoReliefString
201     Position 10 5
202     Size 296 20
203     Type ItemDraw
204     Title {}
205 Main
206 Case message of
207  SingleClic :
208  Begin
209  End
212 # main rectangle
213 Widget 2
214 Property
215     Flags NoReliefString
216     Position 10 25
217     Size 296 115
218     Type Rectangle
219     Title {}
220 Main
221 Case message of
222  SingleClic :
223  Begin
224  End
227 #first rainbow
228 Widget 10
229 Property
230     Flags NoReliefString
231     Position 30 35
232     Size 256 20
233     Type ItemDraw
234     Title {}
235     Icon fvwmscript/palette-rainbow.xpm
236 Main
237 Case message of
238  SingleClic :
239  Begin
240     Set $X = (GetMinValue 10)
241     Set $index = (Mult $X 2)
242     Set $index = (Add $index 2)
243     Set $end = (Add $index 1)
244     Set $name = (StrCopy $ColorLine $index $end)
245     Set $a = (StrCopy $name 1 1)
246     Set $b = (StrCopy $name 2 2)
247     If $a == {^} Then
248         Set $a={\^}
249     If $b == {^} Then
250         Set $b={\^}
251     If $a == {`} Then
252         Set $a={\`}
253     If $b == {`} Then
254         Set $b={\`}
255     # do we have to protec other characters?    
256     Set $cmd = {grep "[}$a{][}$b{] c #" }$RainbowFile
257     Set $tmp = (GetOutput $cmd 1 -1)
258     Set $LightColor = (StrCopy $tmp 7 19)
259     Set $LightRed = (StrCopy $LightColor 2 3)
260     Set $LightGreen = (StrCopy $LightColor 6 7)
261     Set $LightBlue = (StrCopy $LightColor 10 11)
262     Set $LightColor = {#} $LightRed $LightGreen $LightBlue
263     Do {Colorset 29 fg black, bg #908090, HGradient 256 2 #000000 50 }$LightColor{ 50 #ffffff, NoShape}
264     Set $LightNumRed = (HexToNum $LightRed)
265     Set $LightNumGreen = (HexToNum $LightGreen)
266     Set $LightNumBlue = (HexToNum $LightBlue)
267     Set $IsSecond = 0
268  End
271 #second rainbow
272 Widget 13
273 Property
274     Flags NoReliefString
275     Position 30 60
276     Size 256 20
277     Type ItemDraw
278     Title {}
279     Icon fvwmscript/palette-rainbow.xpm
280 Main
281 Case message of
282  SingleClic :
283  Begin
284     Set $X = (GetMinValue 13)
285     Set $index = (Mult $X 2)
286     Set $index = (Add $index 2)
287     Set $end = (Add $index 1)
288     Set $name = (StrCopy $ColorLine $index $end)
289     Set $a = (StrCopy $name 1 1)
290     Set $b = (StrCopy $name 2 2)
291     If $a == {^} Then
292         Set $a={\^}
293     If $b == {^} Then
294         Set $b={\^}
295     If $a == {`} Then
296         Set $a={\`}
297     If $b == {`} Then
298         Set $b={\`}     
299     # do we have to protec other characters?    
300     Set $cmd = {grep "[}$a{][}$b{] c #" }$RainbowFile
301     Set $tmp = (GetOutput $cmd 1 -1)
302     Set $SecondColor = (StrCopy $tmp 7 19)
303     Set $SecondRed = (StrCopy $SecondColor 2 3)
304     Set $SecondGreen = (StrCopy $SecondColor 6 7)
305     Set $SecondBlue = (StrCopy $SecondColor 10 11)
306     Set $SecondColor = {#} $SecondRed $SecondGreen $SecondBlue
307     Do {Colorset 29 fg black, bg #908090, HGradient 256 }$SecondColor{ }$CurrentColor{, NoShape}
308     Set $SecondNumRed = (HexToNum $SecondRed)
309     Set $SecondNumGreen = (HexToNum $SecondGreen)
310     Set $SecondNumBlue = (HexToNum $SecondBlue)
311     Set $OrigNumRed = $NumRed
312     Set $OrigNumGreen = $NumGreen
313     Set $OrigNumBlue = $NumBlue
314     Set $IsSecond = 1
315  End
318 # grey
319 Widget 11
320 Property
321     Flags NoReliefString
322     Position 30 85
323     Size 256 20
324     Type ItemDraw
325     Title {}
326     Icon fvwmscript/palette-gray.xpm
327 Main
328 Case message of
329  SingleClic :
330  Begin
331     Set $X = (GetMinValue 11)
332     Set $index = (Mult $X 2)
333     Set $index = (Add $index 2)
334     Set $end = (Add $index 1)
335     Set $name = (StrCopy $GreyColorLine $index $end)
336     Set $a = (StrCopy $name 1 1)
337     Set $b = (StrCopy $name 2 2)
338     If $a == {^} Then
339         Set $a={\^}
340     If $b == {^} Then
341         Set $b={\^}
342     If $a == {`} Then
343         Set $a={\`}
344     If $b == {`} Then
345         Set $b={\`}
346     # do we have to protec other characters?    
347     Set $cmd = {grep "[}$a{][}$b{] c #" }$GreyFile
348     Set $tmp = (GetOutput $cmd 1 -1)
349     Set $SecondColor = (StrCopy $tmp 7 19)
350     Set $SecondRed = (StrCopy $SecondColor 2 3)
351     Set $SecondGreen = (StrCopy $SecondColor 6 7)
352     Set $SecondBlue = (StrCopy $SecondColor 10 11)
353     Set $SecondColor = {#} $SecondRed $SecondGreen $SecondBlue
354     Do {Colorset 29 fg black, bg #908090, HGradient 256 }$SecondColor{ }$CurrentColor{, NoShape}
355     Set $IsSecond = 1
356     Set $SecondNumRed = (HexToNum $SecondRed)
357     Set $SecondNumGreen = (HexToNum $SecondGreen)
358     Set $SecondNumBlue = (HexToNum $SecondBlue)
359     Set $OrigNumRed = $NumRed
360     Set $OrigNumGreen = $NumGreen
361     Set $OrigNumBlue = $NumBlue
362  End
365 Widget 12
366 Property
367     Flags NoReliefString
368     Position 30 110
369     Size 256 20
370     Colorset 29
371     Type ItemDraw
372     Title {}
373 Main
374 Case message of
375  SingleClic :
376  Begin
377     Set $X = (GetMinValue 12)
378     If $IsSecond == 0 Then
379     Begin
380         If $X > 128 Then
381         Begin
382             Set $X = (Add $X -128)
383             Set $cmd = {perl -e '$ln = }$LightNumRed{; $x = }$X{; $r = $ln + ($x/128)*(256-$ln); $r = int($r); $r = 255 if $r > 255; print "$r\n"'}
384             Set $NumRed = (GetOutput $cmd 1 -1)
385             Set $cmd = {perl -e '$ln = }$LightNumGreen{; $x = }$X{; $r = $ln + ($x/128)*(256-$ln); $r = int($r); $r = 255 if $r > 255; print "$r\n"'}
386             Set $NumGreen = (GetOutput $cmd 1 -1)
387             Set $cmd = {perl -e '$ln = }$LightNumBlue{; $x = }$X{; $r = $ln + ($x/128)*(256-$ln); $r = int($r); $r = 255 if $r > 255; print "$r\n"'}
388             Set $NumBlue = (GetOutput $cmd 1 -1)
389         End
390         Else
391         Begin
392             Set $cmd = {perl -e '$ln = }$LightNumRed{; $x = }$X{; $r = ($x/128)*($ln); $r = int($r); print "$r\n"'}
393             Set $NumRed = (GetOutput $cmd 1 -1)
394             Set $cmd = {perl -e '$ln = }$LightNumGreen{; $x = }$X{; $r = ($x/128)*($ln); $r = int($r);print "$r\n"'}
395             Set $NumGreen = (GetOutput $cmd 1 -1)
396             Set $cmd = {perl -e '$ln = }$LightNumBlue{; $x = }$X{; $r = ($x/128)*($ln); $r = int($r);print "$r\n"'}
397             Set $NumBlue = (GetOutput $cmd 1 -1)
398         End
399     End
400     Else
401     Begin
402         Set $cmd = {perl -e '$ln = }$OrigNumRed{; $g = }$SecondNumRed{; $x = }$X{; $r = (($ln - $g)*$x)/256 + $g; $r = int($r); print "$r\n"'}
403             Set $NumRed = (GetOutput $cmd 1 -1)
404             Set $cmd = {perl -e '$ln = }$OrigNumGreen{; $g = }$SecondNumGreen{; $x = }$X{; $r = (($ln - $g)*$x)/256 + $g; $r = int($r); print "$r\n"'}
405             Set $NumGreen = (GetOutput $cmd 1 -1)
406             Set $cmd ={perl -e '$ln = }$OrigNumBlue{; $g = }$SecondNumBlue{; $x = }$X{; $r = (($ln - $g)*$x)/256 + $g; $r = int($r); print "$r\n"'}
407             Set $NumBlue = (GetOutput $cmd 1 -1)
408     End
409     Set $Red = (NumToHex $NumRed 2)
410     Set $Green = (NumToHex $NumGreen 2)
411     Set $Blue = (NumToHex $NumBlue 2)
412     Set $CurrentColor = {#} $Red $Green $Blue
413     Set $UpdateColors = 1
414  End
417 # Selected Color (title):
418 Widget 14
419 Property
420     Flags NoReliefString
421     Position 5 152
422     Size 145 20
423     Type ItemDraw
424     Title {}
425 Main
426 Case message of
427  SingleClic :
428  Begin
429  End
432 # The color
433 Widget 15
434 Property
435     Flags NoReliefString
436     Position 158 153
437     Size 50 20
438     Type ItemDraw
439     Title {}
440 Main
441 Case message of
442  SingleClic :
443  Begin
444     Set $LightRed = $Red
445     Set $LightGreen = $Green
446     Set $LightBlue = $Blue
447     Set $LightColor = {#} $LightRed $LightGreen $LightBlue
448     Do {Colorset 29 fg black, bg #908090, HGradient 256 2 #000000 50 }$LightColor{ 50 #ffffff, NoShape}
449     Set $LightNumRed = $NumRed
450     Set $LightNumGreen = $NumGreen
451     Set $LightNumBlue = $NumBlue
452     Set $IsSecond = 0
453  End
456 Widget 16
457 Property
458     Flags NoReliefString
459     Position 157 152
460     Size 52 22
461     Type Rectangle
462     Title {}
463 Main
464 Case message of
465  SingleClic :
466  Begin
467  End
470 # color in hex
471 Widget 17
472 Property
473     Flags NoReliefString
474     Position 220 155
475     Size 70 15
476     Type ItemDraw
477     Title {}
478 Main
479 Case message of
480  SingleClic :
481  Begin
482  End
485 # R
486 Widget 30
487 Property
488     Flags NoReliefString
489     Position 20 195
490     Size  40 15
491     Type ItemDraw
492     Title {}
493 Main
494 Case message of
495  SingleClic :
496  Begin
497  End
500 Widget 31
501 Property
502  Size 1 1
503  Position 70 185
504  Type MiniScroll
505  Flags NoReliefString
506  Font -*-fixed-medium-r-semicondensed-*-13-*
507  MinValue 0
508  MaxValue 255
509 Main
510  Case message of
511   SingleClic :
512   Begin
513     Set $NumR = (GetValue 31)
514     Set $NumG = (GetValue 33)
515     Set $NumB = (GetValue 35)
516     Set $test = (Mult $NumR -1)
517     Set $test = (Add $test $NumRed)
518     If $test > 200 Then
519         ChangeValue 31 255
520     Set $test = (Mult $NumRed -1)
521     Set $test = (Add $test $NumR)
522     If $test > 200 Then
523         ChangeValue 31 0
524     Set $NumRed = (GetValue 31)
525     Set $NumGreen = (GetValue 33)
526     Set $NumBlue = (GetValue 35)
527     Set $Red = (NumToHex $NumRed 2)
528     Set $Green = (NumToHex $NumGreen 2)
529     Set $Blue = (NumToHex $NumBlue 2)
530     Set $CurrentColor = {#} $Red $Green $Blue
531     ChangeBackColor 15 $CurrentColor
532     ChangeTitle 17 $CurrentColor
533     Set $t ={R: } $Red
534     ChangeTitle 30 $t
535     Set $t ={G: } $Green
536     ChangeTitle 32 $t
537     Set $t ={B: } $Blue
538     ChangeTitle 34 $t
539   End
542 # G
543 Widget 32
544 Property
545     Flags NoReliefString
546     Position 110 195
547     Size  40 15
548     Type ItemDraw
549     Title {}
550 Main
551 Case message of
552  SingleClic :
553  Begin
554  End
557 Widget 33
558 Property
559  Font -*-fixed-medium-r-semicondensed-*-13-*   
560  Size 1 1
561  Position 160 185
562  Type MiniScroll
563  Flags NoReliefString
564  Value 196
565  MinValue 1
566  MaxValue 255
567 Main
568  Case message of
569   SingleClic :
570   Begin
571     Set $NumR = (GetValue 31)
572     Set $NumG = (GetValue 33)
573     Set $NumB = (GetValue 35)
574     Set $test = (Mult $NumG -1)
575     Set $test = (Add $test $NumGreen)
576     If $test > 200 Then
577         ChangeValue 33 255
578     Set $test = (Mult $NumGreen -1)
579     Set $test = (Add $test $NumG)
580     If $test > 200 Then
581         ChangeValue 33 0
582     Set $NumRed = (GetValue 31)
583     Set $NumGreen = (GetValue 33)
584     Set $NumBlue = (GetValue 35)
585     Set $Red = (NumToHex $NumRed 2)
586     Set $Green = (NumToHex $NumGreen 2)
587     Set $Blue = (NumToHex $NumBlue 2)
588     Set $CurrentColor = {#} $Red $Green $Blue
589     ChangeBackColor 15 $CurrentColor
590     ChangeTitle 17 $CurrentColor
591     Set $t ={R: } $Red
592     ChangeTitle 30 $t
593     ChangeValue 31 $NumRed
594     Set $t ={G: } $Green
595     ChangeTitle 32 $t
596     ChangeValue 33 $NumGreen
597     Set $t ={B: } $Blue
598     ChangeTitle 34 $t
599     ChangeValue 35 $NumBlue
600   End
603 # B
604 Widget 34
605 Property
606     Flags NoReliefString
607     Position 200 195
608     Size  40 15
609     Type ItemDraw
610     Title {}
611 Main
612 Case message of
613  SingleClic :
614  Begin
615  End
618 Widget 35
619 Property
620  Size 250 1
621  Position 250 185
622  Type MiniScroll
623  Flags NoReliefString
624  Font -*-fixed-medium-r-semicondensed-*-13-*
625  Value 184
626  MinValue 0
627  MaxValue 255
628 Main
629  Case message of
630   SingleClic :
631   Begin
632     Set $NumR = (GetValue 31)
633     Set $NumG = (GetValue 33)
634     Set $NumB = (GetValue 35)
635     Set $test = (Mult $NumB -1)
636     Set $test = (Add $test $NumBlue)
637     If $test > 200 Then
638         ChangeValue 35 255
639     Set $test = (Mult $NumBlue -1)
640     Set $test = (Add $test $NumB)
641     If $test > 200 Then
642         ChangeValue 35 0
643     Set $NumRed = (GetValue 31)
644     Set $NumGreen = (GetValue 33)
645     Set $NumBlue = (GetValue 35)
646     Set $Red = (NumToHex $NumRed 2)
647     Set $Green = (NumToHex $NumGreen 2)
648     Set $Blue = (NumToHex $NumBlue 2)
649     Set $CurrentColor = {#} $Red $Green $Blue
650     ChangeBackColor 15 $CurrentColor
651     ChangeTitle 17 $CurrentColor
652     Set $t ={R: } $Red
653     ChangeTitle 30 $t
654     ChangeValue 31 $NumRed
655     Set $t ={G: } $Green
656     ChangeTitle 32 $t
657     ChangeValue 33 $NumGreen
658     Set $t ={B: } $Blue
659     ChangeTitle 34 $t
660     ChangeValue 35 $NumBlue
661   End
664 #----------------------------------------------------------------------------
666 # Ok
667 Widget 992
668 Property
669     Flags NoReliefString
670     Position 20 245
671     Size 80 20
672     Type PushButton
673     Title {OK}
674 Main
675 Case message of
676  SingleClic :
677  Begin
678     If $Launched == {yes} Then
679     Begin
680         Set $ret = $CurrentColor
681         SendToScript (GetScriptFather) $ret
682     End
683     Quit
684  End
687 # Help
688 Widget 993
689 Property
690     Flags NoReliefString
691     Position 120 245
692     Size 80 20
693     Type PushButton
694     Title {}
695 Main
696 Case message of
697  SingleClic :
698  Begin
699     Set $arg={FvwmScript-Help --in-line-doc FvwmScript-ColorSelector --title "Color Selector"}
700     If $ViewerColorset <> {} Then
701         Set $arg=$arg{ --text-colorset }$ViewerColorset
702     If $Lang <> {} Then
703         Set $arg=$arg{ --lang }$Lang
704     Set $dummy = (LaunchScript $arg)
705  End
708 # Cancel
709 Widget 994
710 Property
711     Flags NoReliefString
712     Position 220 245
713     Size 80 20
714     Type PushButton
715     Title {}
716 Main
717 Case message of
718  SingleClic :
719  Begin
720     If $Launched == {yes} Then
721         SendToScript (GetScriptFather) {Cancel}
722     Quit
723  End