GetStyleTagData Style Query Command

Gets the {...} .

GetStyleTagData ([TYPEFONT &font][TYPESIZE &size][TYPEWIDTH &width][RGBCOLOR &r &g &b][CMYKCOLOR &c &m &y &k] [STYLETAG document:...-tagname])


Parameters:


Results:


Notes:


See Also:


Examples:
Python:


ARexx:

Applescript:

 

GetStyleTagData  Command Definition  url:PGScmd/getstyletagdata
  created:2006-05-04 16:47:47   last updated:2006-05-04 16:47:47
  Copyright © 1985-2024 GrasshopperLLC. All Rights Reserved.

User Contributed Comments For GetStyleTagData
Tim Doty wrote...2006-07-08 06:37:51

Python:

>>> ColorList = GetColors('names')['names']
>>> for color in ColorList:
>>> print GetStyleTagData('TYPEFONT', 'font', 'TYPESIZE', 'size', 'TYPEWIDTH', 'width', 'RGBCOLOR', 'red', 'green', 'blue', 'CMYKCOLOR', 'cyan', 'magenta', 'yellow', 'black', 'STYLETAG', color)
{'blue': 100.0, 'yellow': 0.0, '.error': 1, 'green': 100.0, '.result': 0, 'cyan': 0.0, 'magenta': 0.0, 'red': 100.0, 'black': 0.0}
{'blue': 0.0, 'yellow': 0.0, '.error': 1, 'green': 0.0, '.result': 0, 'cyan': 0.0, 'magenta': 0.0, 'red': 0.0, 'black': 100.0}
{'blue': 0.0, 'yellow': 100.0, '.error': 1, 'green': 0.0, '.result': 0, 'cyan': 0.0, 'magenta': 100.0, 'red': 100.0, 'black': 0.0}
{'blue': 0.0, 'yellow': 100.0, '.error': 1, 'green': 100.0, '.result': 0, 'cyan': 100.0, 'magenta': 0.0, 'red': 0.0, 'black': 0.0}
{'blue': 100.0, 'yellow': 0.0, '.error': 1, 'green': 0.0, '.result': 0, 'cyan': 100.0, 'magenta': 100.0, 'red': 0.0, 'black': 0.0}
{'blue': 100.0, 'yellow': 0.0, '.error': 1, 'green': 100.0, '.result': 0, 'cyan': 100.0, 'magenta': 0.0, 'red': 0.0, 'black': 0.0}
{'blue': 100.0, 'yellow': 0.0, '.error': 1, 'green': 0.0, '.result': 0, 'cyan': 0.0, 'magenta': 100.0, 'red': 100.0, 'black': 0.0}
{'blue': 0.0, 'yellow': 100.0, '.error': 1, 'green': 100.0, '.result': 0, 'cyan': 0.0, 'magenta': 0.0, 'red': 100.0, 'black': 0.0}
{'blue': 50.0, 'yellow': 0.0, '.error': 1, 'green': 0.0, '.result': 0, 'cyan': 0.0, 'magenta': 50.0, 'red': 50.0, 'black': 50.0}
{'blue': 0.0, 'yellow': 100.0, '.error': 1, 'green': 50.0, '.result': 0, 'cyan': 0.0, 'magenta': 50.0, 'red': 100.0, 'black': 0.0}

Note, it is an error to not provide variables for all colors. If the color is the last parameter specified and insufficient arguments follow then an error is generated. Otherwise the following parameters are taken to be the color variables in question. For example:

Python:

GetStyleTagData('RGBColor','red','CMYKColor', 'cyan', 'StyleTag', 'Red')

Won't generate an error, but will return the green value in the variable 'cmykcolor' and the blue value in the variable 'cyan'. [PageStream lowercases all variable names passed to it.] In other words, a keyword does not take precedence over the expected parameter. This is why you can do

Python:

GetStyleTagData('typefont', 'typefont', 'styletag', 'somestyle')

PageStream doesn't care or even notice that you happened to name the variable after a keyword.

User Contributed Comments For GetStyleTagData