home *** CD-ROM | disk | FTP | other *** search
/ PC Format Collection 48 / SENT14D.ISO / tech / delphi / disk15 / macros.pak / CONDFMT.MAC < prev    next >
Unknown  |  1995-08-24  |  1.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert MacPaint Image (image/macPaint) ext Supported
1% dexvert Installer VISE Package (archive/installerVISE) ext Unsupported
1% dexvert Platinen Layout Programm Macro (other/platinenLayoutProgrammMacro) ext Unsupported
100% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 02 5b 06 54 4d 61 63 72 | 6f 06 00 0a 43 6f 6c 6f |.[.TMacr|o...Colo|
|00000010| 72 5f 54 79 70 65 67 54 | 68 69 73 20 4d 61 63 72 |r_TypegT|his Macr|
|00000020| 6f 20 77 69 6c 6c 20 63 | 68 61 6e 67 65 20 74 68 |o will c|hange th|
|00000030| 65 20 63 6f 6c 6f 72 20 | 6f 66 20 74 68 65 20 64 |e color |of the d|
|00000040| 61 74 61 20 66 69 65 6c | 64 73 20 74 68 61 74 20 |ata fiel|ds that |
|00000050| 69 74 20 69 73 20 6c 69 | 6e 6b 65 64 20 74 6f 2c |it is li|nked to,|
|00000060| 20 64 65 70 65 6e 64 69 | 6e 67 20 6f 6e 20 74 68 | dependi|ng on th|
|00000070| 65 20 66 69 6c 6d 20 74 | 79 70 65 2e 20 20 d0 05 |e film t|ype. ..|
|00000080| 27 20 54 68 69 73 20 6d | 61 63 72 6f 20 69 73 20 |' This m|acro is |
|00000090| 61 6e 20 65 78 61 6d 70 | 6c 65 20 6f 66 20 63 6f |an examp|le of co|
|000000a0| 6e 64 69 74 69 6f 6e 61 | 6c 20 66 6f 72 6d 61 74 |nditiona|l format|
|000000b0| 74 69 6e 67 2e 20 49 74 | 20 77 69 6c 6c 20 63 68 |ting. It| will ch|
|000000c0| 61 6e 67 65 20 74 68 65 | 20 63 6f 6c 6f 72 20 6f |ange the| color o|
|000000d0| 66 20 74 68 65 20 0d 0a | 27 20 64 61 74 61 20 66 |f the ..|' data f|
|000000e0| 69 65 6c 64 73 2c 20 74 | 68 61 74 20 69 74 20 69 |ields, t|hat it i|
|000000f0| 73 20 6c 69 6e 6b 65 64 | 20 74 6f 2c 20 64 65 70 |s linked| to, dep|
|00000100| 65 6e 64 69 6e 67 20 6f | 6e 20 74 68 65 20 6d 6f |ending o|n the mo|
|00000110| 76 69 65 20 74 79 70 65 | 2e 20 54 72 79 20 6c 69 |vie type|. Try li|
|00000120| 6e 6b 69 6e 67 20 74 68 | 69 73 20 6d 61 63 72 6f |nking th|is macro|
|00000130| 0d 0a 27 20 74 6f 20 6f | 74 68 65 72 20 66 69 65 |..' to o|ther fie|
|00000140| 6c 64 73 20 69 6e 20 74 | 68 69 73 20 72 65 70 6f |lds in t|his repo|
|00000150| 72 74 2e 20 4e 6f 74 69 | 63 65 20 74 68 61 74 20 |rt. Noti|ce that |
|00000160| 74 68 65 20 73 61 6d 65 | 20 6d 61 63 72 6f 20 63 |the same| macro c|
|00000170| 61 6e 20 62 65 20 75 73 | 65 64 20 74 6f 20 0d 0a |an be us|ed to ..|
|00000180| 27 20 63 6f 6e 64 69 74 | 69 6f 6e 61 6c 6c 79 20 |' condit|ionally |
|00000190| 66 6f 72 6d 61 74 20 6d | 6f 72 65 20 74 68 61 74 |format m|ore that|
|000001a0| 20 6f 6e 65 20 63 6f 6c | 75 6d 6e 2e 0d 0a 0d 0a | one col|umn.....|
|000001b0| 53 75 62 20 43 6f 6c 6f | 72 5f 54 79 70 65 28 29 |Sub Colo|r_Type()|
|000001c0| 0d 0a 0d 0a 20 20 27 20 | 55 73 65 20 74 68 65 20 |.... ' |Use the |
|000001d0| 52 47 42 20 66 75 6e 63 | 74 69 6f 6e 20 74 6f 20 |RGB func|tion to |
|000001e0| 6d 61 6b 65 20 74 68 65 | 20 63 6f 6c 6f 72 73 20 |make the| colors |
|000001f0| 61 6e 64 20 61 73 73 69 | 67 6e 20 74 68 65 6d 20 |and assi|gn them |
|00000200| 74 6f 20 76 61 72 69 61 | 62 6c 65 73 2e 0d 0a 0d |to varia|bles....|
|00000210| 0a 20 20 52 65 64 20 3d | 20 52 47 42 28 20 32 35 |. Red =| RGB( 25|
|00000220| 35 2c 30 2c 30 20 29 0d | 0a 20 20 42 6c 75 65 20 |5,0,0 ).|. Blue |
|00000230| 3d 20 52 47 42 28 20 30 | 2c 30 2c 32 35 35 20 29 |= RGB( 0|,0,255 )|
|00000240| 0d 0a 20 20 47 72 65 65 | 6e 20 3d 20 52 47 42 28 |.. Gree|n = RGB(|
|00000250| 20 30 2c 31 32 38 2c 30 | 29 0d 0a 20 20 50 75 72 | 0,128,0|).. Pur|
|00000260| 70 6c 65 20 3d 20 52 47 | 42 28 31 32 38 2c 30 2c |ple = RG|B(128,0,|
|00000270| 32 35 35 29 0d 0a 0d 0a | 20 20 27 20 47 65 74 20 |255)....| ' Get |
|00000280| 74 68 65 20 74 79 70 65 | 20 6f 66 20 74 68 65 20 |the type| of the |
|00000290| 66 69 6c 6d 20 66 6f 72 | 20 74 68 65 20 63 75 72 |film for| the cur|
|000002a0| 72 65 6e 74 20 72 65 63 | 6f 72 64 20 61 6e 64 20 |rent rec|ord and |
|000002b0| 73 74 6f 72 65 20 69 74 | 20 69 6e 20 61 20 6c 6f |store it| in a lo|
|000002c0| 63 61 6c 20 76 61 72 69 | 61 62 6c 65 20 0d 0a 20 |cal vari|able .. |
|000002d0| 20 27 20 63 61 6c 6c 65 | 64 20 46 69 6c 6d 5f 54 | ' calle|d Film_T|
|000002e0| 79 70 65 24 2e 0d 0a 20 | 20 46 69 6c 6d 5f 54 79 |ype$... | Film_Ty|
|000002f0| 70 65 24 20 3d 20 46 69 | 65 6c 64 24 28 20 22 46 |pe$ = Fi|eld$( "F|
|00000300| 49 4c 4d 5f 54 59 50 45 | 22 29 20 0d 0a 0d 0a 20 |ILM_TYPE|") .... |
|00000310| 20 27 20 53 65 74 20 75 | 70 20 61 20 76 61 72 69 | ' Set u|p a vari|
|00000320| 61 62 6c 65 2c 20 43 6f | 6c 6f 72 2c 20 74 6f 20 |able, Co|lor, to |
|00000330| 62 65 20 75 73 65 64 20 | 66 6f 72 20 74 68 65 20 |be used |for the |
|00000340| 63 6f 6c 6f 72 20 76 61 | 6c 75 65 20 70 61 72 61 |color va|lue para|
|00000350| 6d 74 65 72 20 69 6e 20 | 74 68 65 20 66 75 6e 63 |mter in |the func|
|00000360| 74 69 6f 6e 20 0d 0a 20 | 20 27 20 46 69 65 6c 64 |tion .. | ' Field|
|00000370| 46 6f 6e 74 2e 20 41 20 | 63 6f 6c 6f 72 20 76 61 |Font. A |color va|
|00000380| 6c 75 65 20 6f 66 20 2d | 31 20 6d 65 61 6e 73 20 |lue of -|1 means |
|00000390| 64 6f 6e 27 74 20 63 68 | 61 6e 67 65 20 74 68 65 |don't ch|ange the|
|000003a0| 20 63 6f 6c 6f 72 2e 20 | 48 65 72 65 20 77 65 20 | color. |Here we |
|000003b0| 69 6e 69 74 69 61 6c 69 | 7a 65 20 0d 0a 20 20 27 |initiali|ze .. '|
|000003c0| 20 74 68 69 73 20 76 61 | 72 69 61 62 6c 65 2e 0d | this va|riable..|
|000003d0| 0a 20 20 43 6f 6c 6f 72 | 20 3d 20 2d 31 0d 0a 20 |. Color| = -1.. |
|000003e0| 20 0d 0a 20 20 27 20 53 | 65 74 20 74 68 65 20 43 | .. ' S|et the C|
|000003f0| 6f 6c 6f 72 20 76 61 72 | 69 61 62 6c 65 20 74 6f |olor var|iable to|
|00000400| 20 64 69 66 66 65 72 65 | 6e 74 20 63 6f 6c 6f 72 | differe|nt color|
|00000410| 73 20 66 6f 72 20 64 69 | 66 66 65 72 65 6e 74 20 |s for di|fferent |
|00000420| 6d 6f 76 69 65 20 74 79 | 70 65 73 2e 0d 0a 0d 0a |movie ty|pes.....|
|00000430| 20 20 49 66 20 46 69 6c | 6d 5f 54 79 70 65 24 20 | If Fil|m_Type$ |
|00000440| 3d 20 22 41 63 74 69 6f | 6e 22 20 20 20 20 20 20 |= "Actio|n" |
|00000450| 20 20 20 20 20 20 20 20 | 20 54 68 65 6e 20 20 20 | | Then |
|00000460| 43 6f 6c 6f 72 20 3d 20 | 52 65 64 0d 0a 20 20 49 |Color = |Red.. I|
|00000470| 66 20 46 69 6c 6d 5f 54 | 79 70 65 24 20 3d 20 22 |f Film_T|ype$ = "|
|00000480| 44 72 61 6d 61 22 20 20 | 20 20 20 20 20 20 20 20 |Drama" | |
|00000490| 20 20 20 20 20 54 68 65 | 6e 20 20 20 43 6f 6c 6f | The|n Colo|
|000004a0| 72 20 3d 20 42 6c 75 65 | 0d 0a 20 20 49 66 20 46 |r = Blue|.. If F|
|000004b0| 69 6c 6d 5f 54 79 70 65 | 24 20 3d 20 22 53 63 69 |ilm_Type|$ = "Sci|
|000004c0| 65 6e 63 65 20 46 69 63 | 74 69 6f 6e 22 20 20 54 |ence Fic|tion" T|
|000004d0| 68 65 6e 20 20 20 43 6f | 6c 6f 72 20 3d 20 47 72 |hen Co|lor = Gr|
|000004e0| 65 65 6e 20 20 20 0d 0a | 20 20 49 66 20 46 69 6c |een ..| If Fil|
|000004f0| 6d 5f 54 79 70 65 24 20 | 3d 20 22 43 61 72 74 6f |m_Type$ |= "Carto|
|00000500| 6f 6e 73 22 20 20 20 20 | 20 20 20 20 20 20 20 20 |ons" | |
|00000510| 54 68 65 6e 20 20 20 43 | 6f 6c 6f 72 20 3d 20 50 |Then C|olor = P|
|00000520| 75 72 70 6c 65 20 20 0d | 0a 0d 0a 20 20 27 20 55 |urple .|... ' U|
|00000530| 73 65 20 74 68 65 20 46 | 69 65 6c 64 46 6f 6e 74 |se the F|ieldFont|
|00000540| 20 66 75 6e 63 74 69 6f | 6e 20 74 6f 20 63 68 61 | functio|n to cha|
|00000550| 6e 67 65 20 74 68 65 20 | 66 6f 6e 74 73 20 63 6f |nge the |fonts co|
|00000560| 6c 6f 72 2e 20 54 68 65 | 20 61 76 61 69 6c 61 62 |lor. The| availab|
|00000570| 6c 65 20 70 61 72 61 6d | 65 74 65 72 73 20 66 6f |le param|eters fo|
|00000580| 72 0d 0a 20 20 27 20 46 | 69 65 6c 64 46 6f 6e 74 |r.. ' F|ieldFont|
|00000590| 2c 20 69 6e 20 6f 72 64 | 65 72 2c 20 61 72 65 20 |, in ord|er, are |
|000005a0| 66 6f 6e 74 20 6e 61 6d | 65 2c 20 66 6f 6e 74 20 |font nam|e, font |
|000005b0| 73 69 7a 65 2c 20 73 74 | 79 6c 65 2c 20 66 6f 72 |size, st|yle, for|
|000005c0| 65 67 72 6f 75 6e 64 20 | 63 6f 6c 6f 72 2c 20 61 |eground |color, a|
|000005d0| 6e 64 20 0d 0a 20 20 27 | 20 62 61 63 6b 67 72 6f |nd .. '| backgro|
|000005e0| 75 6e 64 20 63 6f 6c 6f | 72 2e 20 4e 6f 74 69 63 |und colo|r. Notic|
|000005f0| 65 20 77 65 20 75 73 65 | 20 74 68 65 20 76 61 72 |e we use| the var|
|00000600| 69 61 62 6c 65 2c 20 43 | 6f 6c 6f 72 2c 20 66 6f |iable, C|olor, fo|
|00000610| 72 20 74 68 65 20 66 6f | 72 65 67 72 6f 75 6e 64 |r the fo|reground|
|00000620| 20 63 6f 6c 6f 72 2e 0d | 0a 20 20 46 69 65 6c 64 | color..|. Field|
|00000630| 46 6f 6e 74 20 22 22 2c | 30 2c 2d 31 2c 43 6f 6c |Font "",|0,-1,Col|
|00000640| 6f 72 2c 2d 31 0d 0a 0d | 0a 45 6e 64 20 53 75 62 |or,-1...|.End Sub|
|00000650| ff ff 17 43 3a 5c 4e 45 | 57 4d 41 43 52 4f 5c 43 |...C:\NE|WMACRO\C|
|00000660| 4f 4e 44 46 4d 54 2e 4d | 41 43 00 00 5d |ONDFMT.M|AC..] |
+--------+-------------------------+-------------------------+--------+--------+