Page History
...
Example
Code Block |
---|
Declare function Send_Message Red = 255 Green = 255 * 256 Blue = 255 * 65536 ApplyFormatTo = 1 // Selection // Create some test text x = Set_Property(@window:'.EDIT_AREA', 'TEXT', "This is a test...") // Select "is a" x = Set_Property(@window:'.EDIT_AREA', 'SELECTION', 6:@fm:4) // Make the "is a" bold and blue CharFormat = '' CharFormat<1,1> = '1' CharFormat<4> = Blue x = Send_Message(@window:'.EDIT_AREA', 'SETCHARFORMAT', ApplyFormatTo, CharFormat) // Reset the cursor back to the beginning x = Set_Property(@window:'.EDIT_AREA', 'SELECTION', 1:@fm:0) // Get the format x = Set_Property(@window:'.EDIT_AREA', 'SELECTION', 6:@fm:4) charFormat = Send_Message(@window:'.EDIT_AREA', 'SETCHARFORMAT',ApplyFormatTo) |