Name
GetAttribute -- get information about an object
Synopsis
info = GetAttribute(obj, id, attr[, param])
Function
This function can be used to retrieve properties from all different kinds of Hollywood objects. For example, you can query the dimensions of a brush or the length of sound file. Please see below for a complete list of object types and their attributes.

The following attributes can be queried for #ANIM:

#ATTRWIDTH:
Returns width of the animation.

#ATTRHEIGHT:
Returns height of the animation.

#ATTRTRANSPARENTCOLOR:
Returns the transparent color of the animation or #NOTRANSPARENCY.

#ATTRNUMFRAMES:
Returns the number of frames in this animation. (V2.0)

#ATTRHASMASK:
Returns True if animation has a mask. (V2.0)

#ATTRHASALPHA:
Returns True if animation has an alpha channel. (V4.5)

#ATTRFRAMEDELAY:
Returns the time anim players should wait after the specified frame in milliseconds. You also need to specify the frame number you want to query in the param argument. Please note that not all animation formats support frame delays and that the information might only be available for frames that are already loaded; i.e. if you are querying a random frame of a disk-based anim, it could be that you get a zero return value because the frame was not loaded yet. (V4.5)

#ATTRCOUNT:
Returns how many animations there are currently in memory. Useful for tracking memory consumption. (V4.5)

#ATTRLOADER:
Returns the name of the loader that was used to load this animation. (V6.0)

The following attributes can be queried for #ANIMSTREAM:

#ATTRCOUNT:
Returns how many anim stream objects are currently in memory. Useful for keeping track of the resources used by your script. (V5.0)

The following attributes can be queried for #ASYNCDRAW:

#ATTRTYPE:
Returns the type of this asynchronous drawing object; will be #ADF_FX, #ADF_MOVEOBJECT or #ADF_ANIM. (V4.5)

#ATTRNUMFRAMES:
Returns the number of frames of this asynchronous drawing object; please note that if you use this value as the base for a loop over AsyncDrawFrame(), you must add one loop because the final call to AsyncDrawFrame() does not count as a frame; See AsyncDrawFrame for details. (V4.5)

#ATTRCURFRAME:
Returns the frame currently on display in this async drawing object. (V4.5)

#ATTRCOUNT:
Returns how many async draw objects there are currently in memory. Useful for tracking memory consumption. (V4.5)

The following attributes can be queried for #BGPIC:

#ATTRWIDTH:
Returns width of the BGPic.

#ATTRHEIGHT:
Returns height of the BGPic.

#ATTRTRANSPARENTCOLOR:
Returns the transparent color of the BGPic or #NOTRANSPARENCY.

#ATTRLAYERS:
Returns the number of layers attached to this BGPic. (V1.5)

#ATTRHASMASK:
Returns True if BGPic has a mask. (V2.0)

#ATTRHASALPHA:
Returns True if BGPic has an alpha channel. (V4.5)

#ATTRCLIPREGION:
Returns the identifier of the clip region currently active on this BGPic or -1 if there is no active clip region. (V4.5)

#ATTRCOUNT:
Returns how many BGPics there are currently in memory. Useful for tracking memory consumption. (V4.5)

#ATTRTYPE:
Returns the type of the BGPic. This will be set to either #IMAGETYPE_RASTER for a raster BGPic or #IMAGETYPE_VECTOR for a vector BGPic. (V5.0)

#ATTRLOADER:
Returns the name of the loader that was used to load this BGPic. (V6.0)

#ATTRSPRITES:
Returns the number of sprites currently visible on this BGPic. (V7.0)

The following attributes can be queried for #BRUSH:

#ATTRWIDTH:
Returns width of the brush.

#ATTRHEIGHT:
Returns height of the brush.

#ATTRTRANSPARENTCOLOR:
Returns the transparent color of the brush or #NOTRANSPARENCY.

#ATTRHASMASK:
Returns True if brush has a mask. (V2.0)

#ATTRHASALPHA:
Returns True if brush has an alpha channel. (V2.0)

#ATTRCOUNT:
Returns how many brushes there are currently in memory. Useful for tracking memory consumption. (V4.5)

#ATTRTYPE:
Returns the type of the brush. This will be set to either #IMAGETYPE_RASTER for a raster brush or #IMAGETYPE_VECTOR for a vector brush. (V5.0)

#ATTRHARDWARE:
Returns True if the specified brush is a hardware brush. See hardware brushes for details. (V5.0)

#ATTRDISPLAY:
Returns the identifier of the display that this brush belongs to if the brush is a display-dependent hardware brush. Otherwise -1 is returned. See hardware brushes for details. (V6.0)

#ATTRLOADER:
Returns the name of the loader that was used to load this brush. (V6.0)

The following attributes can be queried for #CLIENT:

#ATTRCOUNT:
Returns how many network client objects are currently in memory. Useful for keeping track of the resources used by your script. (V5.0)

#ATTRADAPTER:
Returns the name of the adapter that has been used to open this connection or inbuilt if the connection has been opened using Hollywood's inbuilt connection handler. (V8.0)

The following attributes can be queried for #CLIPREGION:

#ATTRXPOS:
Returns the x-position of the clip region. (V3.0)

#ATTRYPOS:
Returns the y-position of the clip region. (V3.0)

#ATTRWIDTH:
Returns the width of the clip region. (V3.0)

#ATTRHEIGHT:
Returns the height of the clip region. (V3.0)

#ATTRCOUNT:
Returns how many clip regions there are currently in memory. Useful for tracking memory consumption. (V4.5)

The following attributes can be queried for #DIRECTORY:

#ATTRCOUNT:
Returns how many directory handles there are currently open. Useful for tracking resources. (V4.5)

#ATTRADAPTER:
Returns the name of the adapter that has been used to open this directory or inbuilt if this directory has been opened using Hollywood's inbuilt directory handler. (V6.0)

The following attributes can be queried for #DISPLAY:

#ATTRWIDTH:
Returns the width of the display; this value does not include the width of the window border.

#ATTRHEIGHT:
Returns the height of the display; this value does not include the height of the window border.

#ATTRMAXWIDTH:
Returns the maximum possible width for this display (i.e. current desktop resolution minus border width).

#ATTRMAXHEIGHT:
Returns the maximum possible height for this display (i.e. current desktop resolution minus border height).

#ATTRBGPIC:
Returns the BGPic associated with this display. (V1.5)

#ATTRLAYERS:
Returns the number of layers in the associated BGPic. (V1.5)

#ATTRCURSORX:
Returns current x-position of the cursor. (V2.5)

#ATTRCURSORY:
Returns current y-position of the cursor. (V2.5)

#ATTRXPOS:
Returns the x-position of the display on the screen. (V3.0)

#ATTRYPOS:
Returns the y-position of the display on the screen. (V3.0)

#ATTRBORDERLEFT:
Returns the width of the left display border or 0 if the display is borderless. (V3.0)

#ATTRBORDERRIGHT:
Returns the width of the right display border or 0 if the display is borderless. (V3.0)

#ATTRBORDERTOP:
Returns the height of the top display border or 0 if the display is borderless. (V3.0)

#ATTRBORDERBOTTOM:
Returns the height of the bottom display border or 0 if the display is borderless. (V3.0)

#ATTRHOSTWIDTH:
Returns the width of the screen on which the display is open (usually the desktop screen). (V3.0)

#ATTRHOSTHEIGHT
Returns the height of the screen on which the display is open (usually the desktop screen). (V3.0)

#ATTRFONTASCENDER, #ATTRFONTDESCENDER, #ATTRFONTNAME, #ATTRFONTSIZE, #ATTRFONTSCALABLE, #ATTRFONTAA
Information about the font currently selected into this display; please read below in #TEXTOBJECT for the info on these attributes. (V3.1)

#ATTRPOINTER:
Returns the identifier of the mouse pointer currently associated with this display. (V4.5)

#ATTRSTATE:
Returns the current state of this display; can be either #DISPSTATE_OPEN (if display is open), or #DISPSTATE_CLOSED (display is currently closed), or #DISPSTATE_MINIMIZED (display is currently minimized). (V4.5)

#ATTRACTIVE:
Returns whether or not this display is currently active; only one display can be active at a time. (V4.5)

#ATTRMODE:
Returns the current screen mode; this can be either #DISPMODE_WINDOWED for windowed mode or it can be #DISPMODE_FULLSCREEN for full screen mode. Note that this is a global setting. You can safely pass 0 for display when querying #ATTRMODE. (V4.5)

#ATTRSCALEMODE:
Returns the scale mode currently active in this display. Can be either #SCALEMODE_NONE, #SCALEMODE_AUTO, or #SCALEMODE_LAYER. (V4.5)

#ATTRSCALEWIDTH:
Returns the currently set scaling width for this display. If no scaling is active, this attribute will return the same width as #ATTRWIDTH. (V4.5)

#ATTRSCALEHEIGHT:
Returns the currently set scaling height for this display. If no scaling is active, this attribute will return the same height as #ATTRHEIGHT. (V4.5)

#ATTRBORDERLESS:
Returns whether or not the display is borderless. (V4.5)

#ATTRSIZEABLE:
Returns whether or not the display is resizeable. (V4.5)

#ATTRFIXED:
Returns whether or not the display is fixed. (V4.5)

#ATTRNOHIDE:
Returns whether or not the display can be iconified by the user. (V4.5)

#ATTRNOMODESWITCH:
Returns True if display mode switching via COMMAND+RETURN (LALT+RETURN on Windows) hotkey is disabled for this display. (V4.5)

#ATTRTITLE:
Returns the display's title string. (V4.5)

#ATTRMARGINLEFT, #ATTRMARGINRIGHT:
Returns the current margin settings for this display as set using SetMargins(). (V4.5)

#ATTRDOUBLEBUFFER:
Returns True if the specified display is a double- buffered one, False if it is not double-buffered. (V4.5)

#ATTROUTPUTDEVICE:
This attribute returns three values containing information about the current output device. The first return value can be either #DISPLAY, #BGPIC, #BRUSH, #ANIM, or #DOUBLEBUFFER. The second return value specifies the corresponding identifier to the type indicated by the first return value. The third return value, finally, is only used by types #BRUSH, #ANIM and #BGPIC (NB: For #BGPIC it is only used when SelectBGPic() was called with mode set to either #SELMODE_NORMAL or #SELMODE_COMBO). In that case, it specifies the graphics of the brush/animation/BGPic that are currently selected: This can be either #MASK, #ALPHACHANNEL or #BRUSH. Note that the third return value will be set to #BRUSH also in case #ANIM/#BGPIC is returned by the first return value. If #BRUSH is returned as the third return value, it means that the color channel of the brush/animation is currently selected. If SelectBGPic() is in #SELMODE_LAYERS, the first and third return value will both be #BGPIC. If SelectBGPic() is in a different mode, the first return value will be #BGPIC, but the third return value will be either #BRUSH, #MASK, or #ALPHACHANNEL. (V4.5)

#ATTRCOUNT:
Returns how many display handles there are currently in memory. Useful for tracking memory consumption. (V4.5)

#ATTRMASKMODE:
Returns the current mask mode. This is a global setting not tied to a specific display. See SetMaskMode for details. (V4.5)

#ATTRALPHAINTENSITY:
Returns the current alpha intensity. This is a global setting not tied to a specific display. See SetAlphaIntensity for details. (V4.5)

#ATTRLAYERSON:
Returns True if the specified display has layers enabled, False if that is not the case. (V5.0)

#ATTRORIENTATION:
Returns the current orientation of the mobile device that Hollywood is running on. The return value will be one of the following orientation modes:

 
#ORIENTATION_PORTRAIT
#ORIENTATION_LANDSCAPE
#ORIENTATION_PORTRAITREV
#ORIENTATION_LANDSCAPEREV

Please note that this tag is only supported in the mobile version of Hollywood. In the desktop version it will always return #ORIENTATION_NONE. (V5.0)

#ATTRPUBSCREEN:
Returns the public screen that this display is currently opened on. This is only supported on AmigaOS compatible operating systems. (V5.2)

#ATTRDENSITY:
Returns the logical density of the display. The return value will be one of the following predefined density values:

 
#DENSITY_LOW
#DENSITY_MEDIUM
#DENSITY_HIGH

Please note that this tag is only supported in the mobile version of Hollywood. In the desktop version it will always return #DENSITY_NONE. (V5.3)

#ATTRXDPI:
Returns the exact physical pixels per inch of the screen on the X axis. Please note that this tag may return a spurious value on older Android devices. (V5.3)

#ATTRYDPI:
Returns the exact physical pixels per inch of the screen on the Y axis. Please note that this tag may return a spurious value on older Android devices. (V5.3)

#ATTRMENU:
Returns the identifier of the menu strip attached to this display or -1 if this display doesn't have a menu strip attached. (V6.0)

#ATTRMONITOR:
Returns the monitor number that this display has been opened on. Monitors are counted from 1 which is the primary monitor. (V6.0)

#ATTRHOSTMONITORS:
Returns the total number of monitors currently available to the system. You can query their dimensions and extended desktop positions using GetMonitors(). (V6.0)

#ATTRXSERVER:
Returns the name of the X Server that this display is connected to. This is only supported on Linux. (V6.0)

#ATTRADAPTER:
Returns the name of the display adapter currently in use. If Hollywood's inbuilt display adapter is used, inbuilt is returned. (V6.0)

#ATTRMAXIMIZED:
Returns True if the display is currently maximized, False otherwise. (V7.0)

#ATTRRAWWIDTH:
Returns the raw physical width of the display, regardless of any scaling engine currently active. Use this attribute with care because it can conflict with scaling engines because they always pretend that Hollywood is in running in a different resolution. (V7.0)

#ATTRRAWHEIGHT:
Returns the raw physical height of the display, regardless of any scaling engine currently active. Use this attribute with care because it can conflict with scaling engines because they always pretend that Hollywood is in running in a different resolution. (V7.0)

#ATTRHOSTTITLEBARHEIGHT:
Returns the height of the host screen's title bar. Note that not all systems have a title bar, most notably Windows doesn't have any. In that case, 0 is returned. (V7.0)

#ATTRHOSTTASKBAR:
Returns information about the taskbar on Windows. This tag will return 5 values: The first two values describe the x- and y-position of the taskbar on the host screen, return values three and four contain the dimensions of the taskbar and the fifth and last return value is a boolean which indicates whether or not the taskbar is currently visible. This tag is currently only supported on Windows. (V7.0)

#ATTRSPRITES:
Returns the number of sprites currently active on this display. (V7.0)

#ATTRHOSTSCALEX:
Returns the scaling coefficient on the x-axis of the display's monitor. Normally, this is 1 but for high resolution displays (e.g. Retina Macs or 4K monitors on Windows) this can be greater than 1. (V7.0)

#ATTRHOSTSCALEY:
Returns the scaling coefficient on the y-axis of the display's monitor. Normally, this is 1 but for high resolution displays (e.g. Retina Macs or 4K monitors on Windows) this can be greater than 1. (V7.0)

#ATTRHOSTSCALE:
Returns the global scaling coefficient of the display's monitor. Normally, this is 1 but for high resolution displays (e.g. Retina Macs or 4K monitors on Windows) this can be greater than 1. (V8.0)

The following attributes can be queried for #EVENTHANDLER:

#ATTRFUNCTION:
Returns the callback function associated with the specified event handler. Note that you need to pass the name of the event handler as a string in id. Just as you would do in InstallEventHandler(). (V4.5)

#ATTRUSERDATA:
Returns the user data that is associated with the specified event handler. Note that you need to pass the name of the event handler as a string in id. Just as you would do in InstallEventHandler(). (V4.5)

The following attributes can be queried for #FILE:

#ATTRMODE:
Returns the mode this file was opened in. Can be either #MODE_READ, #MODE_WRITE, or #MODE_READWRITE. (V4.5)

#ATTRCOUNT:
Returns how many file handles there are currently open. Useful for tracking resources. (V4.5)

#ATTRADAPTER:
Returns the name of the adapter that has been used to open this file or inbuilt if this file has been opened using Hollywood's inbuilt file handler. (V6.0)

The following attributes can be queried for #FONT:

#ATTRFONTASCENDER, #ATTRFONTDESCENDER, #ATTRFONTNAME, #ATTRFONTSIZE, #ATTRFONTSCALABLE, #ATTRFONTAA
Please see below in #TEXTOBJECT for information about the meaning of these attributes. (V4.5)

#ATTRCOUNT:
Returns how many fonts there are currently in memory. Useful for tracking memory consumption. (V4.5)

The following attributes can be queried for #ICON:

#ATTRNUMENTRIES:
Returns the number of images in the icon. (V8.0)

#ATTRSTANDARD:
Returns the index of the standard image in the icon or 0 in case there is no standard image in the icon. (V8.0)

#ATTRWIDTH:
Returns the width of the image at the index specified in the optional param argument. Indices start at 1. (V8.0)

#ATTRHEIGHT:
Returns the height of the image at the index specified in the optional param argument. Indices start at 1. (V8.0)

#ATTRNUMFRAMES:
Returns the number of frames of the image at the index specified in the optional param argument. This can be either 1 or 2, depending on whether the image has only a normal state, or a normal and a selected state. Indices start at 1. (V8.0)

#ATTRCOUNT:
Returns how many icons are currently in memory. Useful for tracking memory consumption. (V8.0)

The following attributes can be queried for #INTERVAL:

#ATTRDURATION:
Returns the frequency of this interval object in milliseconds. (V4.5)

#ATTRFUNCTION:
Returns the callback function associated with the specified interval object. (V4.5)

#ATTRUSERDATA:
Returns the user data associated with this interval object. (V4.5)

The following attributes can be queried for #LAYER:

#ATTRTYPE:
Returns the type of the layer (e.g. #PRINT). (V1.5)

#ATTRXPOS:
Returns the x-position of the layer on the display. (V1.5)

#ATTRYPOS:
Returns the y-position of the layer on the display. (V1.5)

#ATTRWIDTH:
Returns width of the layer. (V1.5)

#ATTRHEIGHT:
Returns height of the layer. (V1.5)

#ATTRVISIBLE:
Returns True if the layer is currently visible, False if it is hidden. (V1.5)

#ATTRLAYERID:
Returns the identifier of the specified layer; obviously, this makes only sense if you specify a layer name instead of an id as the source. (V2.0)

#ATTRNUMFRAMES:
Returns the number of frames of this layer; only works when used with layers of type #ANIM (V2.0) or #VIDEO (V6.0).

#ATTRCURFRAME:
Returns the frame which is currently displayed; works only with layers of type #ANIM. (V2.0)

#ATTRTEXT, #ATTRFONTASCENDER, #ATTRFONTDESCENDER, #ATTRFONTNAME, #ATTRFONTSIZE, #ATTRFONTSCALABLE, #ATTRFONTAA
These attributes can be used with layers of type #PRINT and #TEXTOUT only; to learn more about them read below in the #TEXTOBJECT section. (V4.0)

#ATTRFRAMEDELAY:
Returns the time anim players should wait after displaying the current frame in milliseconds; this works only with layers of type #ANIM. (V4.5)

#ATTRCOUNT:
Returns how many layers there are currently in memory. Useful for tracking memory consumption. Note that this will return the sum of all layers from all BGPics. If you want to query the number of layers in the current BGPic, use #ATTRLAYERS with type #BGPIC. (V4.5)

#ATTRRAWXPOS, #ATTRRAWYPOS, #ATTRRAWWIDTH, #ATTRRAWHEIGHT:
These four attributes can be used to find out the real position and size of a layer. The difference between these attributes and the standard #ATTRXPOS, #ATTRWIDTH etc. attributes is that the standard attributes will always return the position and size of the basic, untransformed layer. The standard attributes will also not take any under/overhangs into account. Still, you should work with the standard attributes whenever possible because the #ATTRRAWxxx attributes operate on a low level in the layers system and could be affected by future changes in the layers system. (V4.7)

#ATTRZPOS:
Returns the z-position of the layer. See SetLayerZPos for details. (V5.1)

#ATTRDURATION:
Returns the video layer's source duration in milliseconds. This is only supported for layers of type #VIDEO. (V6.0)

#ATTRPOSITION:
Returns the current position of a playing or paused video layer in milliseconds. This is only supported for layers of type #VIDEO. (V6.0)

#ATTRFORMAT:
Returns the video layer's source format name as a string. This is only supported for layers of type #VIDEO. (V6.0)

#ATTRCANSEEK:
Returns whether or not SeekLayer() can be used on this video layer. This is only supported for layers of type #VIDEO. (V6.0)

#ATTRPLAYING:
Returns True if this video layer is currently playing. This is only supported for layers of type #VIDEO. (V6.0)

#ATTRPAUSED:
Return True if this video is layer currently paused. This is only supported for layers of type #VIDEO. (V6.0)

#ATTRID:
Returns the identifier of this layer's source object. This is only applicable for layers of type #ANIM, #BRUSH, #BRUSHPART, #BGPICPART, #TEXTOBJECT, #VECTORPATH and #VIDEO. (V6.0)

Please note that the position and size values will always refer to the layer in its original, untransformed state. If you rotate or scale a layer, you will still get its original dimensions through #ATTRWIDTH and #ATTRHEIGHT.

The following attributes can be queried for #MEMORY:

#ATTRSIZE:
Returns the size of specified memory block. (V4.5)

#ATTRCOUNT:
Returns how many memory blocks there are currently in memory. Useful for tracking memory consumption. (V4.5)

The following attributes can be queried for #MENU:

#ATTRCOUNT:
Returns how many menu strips are currently available. Useful for keeping track of the resources used by your script. (V6.0)

The following attributes can be queried for #MOVELIST:

#ATTRCOUNT:
Returns how many move list objects are currently in memory. Useful for keeping track of the resources used by your script. (V5.0)

The following attributes can be queried for #MUSIC:

#ATTRTYPE:
Returns the format of the music raw data; this attribute will return one of #MONO8, #MONO16, #STEREO8 and #STEREO16; not possible with Protracker modules. (V2.0)

#ATTRDURATION:
Returns the music duration in milliseconds. This is unsupported for Protracker modules. If you query #ATTRDURATION for Protracker modules, -1 will be returned. (V2.0)

#ATTRPITCH:
Returns the playback pitch (frequency) of the music in Hertz; not possible with Protracker modules. (V2.0)

#ATTRPOSITION:
Returns the position of the music object in milliseconds. This is unsupported for Protracker modules. If you query #ATTRPOSITION for Protracker modules, -1 will be returned. (V2.0)

#ATTRFORMAT:
Returns the music format as a string. (V2.0)

#ATTRBITRATE:
Returns the bitrate of the music object; if the music object is currently playing and uses a variable bitrate, you will receive the bitrate of the current frame; not possible with Protracker modules. (V2.0)

#ATTRCOUNT:
Returns how many music objects there are currently in memory. Useful for tracking memory consumption. (V4.5)

#ATTRCANSEEK:
Returns whether or not SeekMusic() can be used on this music object. (V5.0)

#ATTRNUMSUBSONGS:
Returns the number of subsongs which you can play using PlaySubsong(). If this 1, then there is only one song in the music object. (V5.3)

#ATTRCURSUBSONG:
Returns the number of the currently playing subsong. (V5.3)

#ATTRPLAYING:
Returns True if this music object is currently playing. (V6.0)

#ATTRPAUSED:
Return True if this music object is currently paused. (V6.0)

#ATTRLOADER:
Returns the name of the loader that was used to load this music object. (V6.0)

The following attributes can be queried for #POINTER:

#ATTRWIDTH:
Returns the width of the pointer image. (V4.5)

#ATTRHEIGHT:
Returns the height of the pointer image. (V4.5)

#ATTRTYPE:
Returns type of this pointer image; can be #STDPTR_CUSTOM, #STDPTR_SYSTEM or #STDPTR_BUSY; See CreatePointer for details. (V4.5)

#ATTRCOUNT:
Returns how many pointer images there are currently in memory. Useful for tracking memory consumption. (V4.5)

The following attributes can be queried for #SAMPLE:

#ATTRTYPE:
Returns the format of the samples raw data; this attribute will return one of #MONO8, #MONO16, #STEREO8 and #STEREO16. (V2.0)

#ATTRDURATION:
Returns the sample duration in milliseconds. (V2.0)

#ATTRPITCH:
Returns the playback pitch (frequency) of the sample in hertz. (V2.0)

#ATTRPOSITION:
Returns how long the sample has been playing and how many times it has looped. The position returned will be a value in milliseconds (1000 milliseconds = 1 second). This value will be reset everytime the sample loops so that the returned position value will never exceed the sample length. The second return value specifies how many times the sample was played. It will be increased by one every time the sample loops. If you need to find out the total playing time in milliseconds, just multiply the second return value minus 1 by the sample duration (use #ATTRDURATION) and add the first return value to it. (V2.0)

#ATTRCOUNT:
Returns how many samples there are currently in memory. Useful for tracking memory consumption. (V4.5)

#ATTRNUMFRAMES:
Returns the number of PCM frames in the sample. (V5.0)

#ATTRPLAYING:
Returns True if this sample is currently playing. (V6.0)

#ATTRLOADER:
Returns the name of the loader that was used to load this sample. (V6.0)

The following attributes can be queried for #SERIAL:

#ATTRCOUNT:
Returns how many serial connection objects are currently in memory. Useful for keeping track of the resources used by your script. (V8.0)

The following attributes can be queried for #SERVER:

#ATTRCOUNT:
Returns how many network server objects are currently in memory. Useful for keeping track of the resources used by your script. (V5.0)

The following attributes can be queried for #SPRITE:

#ATTRWIDTH:
Returns width of the sprite. (V2.0)

#ATTRHEIGHT:
Returns height of the sprite. (V2.0)

#ATTRTRANSPARENTCOLOR:
Returns the transparent color of the sprite or #NOTRANSPARENCY. (V2.0)

#ATTRHASMASK:
Returns True if sprite has a mask. (V2.0)

#ATTRHASALPHA:
Returns True if sprite has an alpha channel. (V2.0)

#ATTRNUMFRAMES:
Returns the number of frames in this sprite. (V2.0)

#ATTRCURFRAME:
Returns the frame which is currently displayed. (V2.0)

#ATTRONSCREEN:
Returns True if the specified sprite is currently on screen. (V2.5)

#ATTRXPOS:
Returns the x-position of the sprite on the screen. (V2.5)

#ATTRYPOS:
Returns the y-position of the sprite on the screen. (V2.5)

#ATTRCOUNT:
Returns how many sprites there are currently in memory. Useful for tracking memory consumption. (V4.5)

#ATTRZPOS:
Returns the z-position of the sprite. See SetSpriteZPos for details. (V7.0)

The following attributes can be queried for #TEXTOBJECT:

#ATTRWIDTH:
Returns width of the text object.

#ATTRHEIGHT:
Returns height of the text object.

#ATTRFONTASCENDER:
Returns the ascender of the current font in pixels; the ascender of a font is the maximum character extent from the baseline to the top of the line; ascender + descender is always equal to the font's pixel height. (V3.1)

#ATTRFONTDESCENDER:
Returns the descender of the current font in pixels; the descender of a font is the maximum character extent from the baseline to the bottom of the line; ascender + descender is always equal to the font's pixel height. (V3.1)

#ATTRFONTNAME:
Returns the name of the currently selected font. (V3.1)

#ATTRFONTSIZE:
Returns the size of the currently selected font. (V3.1)

#ATTRFONTSCALABLE:
Returns True if the font is a scalable vector font. (V3.1)

#ATTRFONTAA:
Returns True if the font can be anti-aliased. (V3.1)

#ATTRTEXT:
Returns the text string of this text object. (V4.0)

#ATTRCOUNT:
Returns how many text objects there are currently in memory. Useful for tracking memory consumption. (V4.5)

The following attributes can be queried for #TIMEOUT:

#ATTRDURATION:
Returns the timeout duration of this timeout object in milliseconds. (V4.5)

#ATTRFUNCTION:
Returns the callback function associated with the specified timeout object. (V4.5)

#ATTRUSERDATA:
Returns the user data associated with this timeout object. (V4.5)

The following attributes can be queried for #TIMER:

#ATTRCOUNT:
Returns how many timer objects are currently in memory. Useful for keeping track of the resources used by your script. (V5.0)

The following attributes can be queried for #UDPOBJECT:

#ATTRCOUNT:
Returns how many UDP objects are currently in memory. Useful for keeping track of the resources used by your script. (V5.0)

The following attributes can be queried for #VECTORPATH:

#ATTRCOUNT:
Returns how many vector path objects there are currently in memory. Useful for tracking memory consumption. (V5.0)

The following attributes can be queried for #VIDEO:

#ATTRWIDTH:
Returns width of the video. (V5.0)

#ATTRHEIGHT:
Returns height of the video. (V5.0)

#ATTRDURATION:
Returns the total video duration in milliseconds. (V5.0)

#ATTRPOSITION:
Returns the current position of a playing or paused video in milliseconds. (V5.0)

#ATTRFORMAT:
Returns the video format name as a string. (V5.0)

#ATTRNUMFRAMES:
Returns the number of frames of this video. Please note that this is often an approximation because it would take too much time to do a precise calculation of all frames in a video stream. This can also return 0 if the video codec does not support frame calculation. (V5.0)

#ATTRCOUNT:
Returns how many videos there are currently in memory. Useful for tracking memory consumption. (V5.0)

#ATTRCANSEEK:
Returns whether or not SeekVideo() can be used on this video object. (V5.0)

#ATTRDRIVER:
Returns the driver used for this video. See ForceVideoDriver for details. This is obsolete since Hollywood 6.0. Use #ATTRLOADER instead. (V5.1)

#ATTRPLAYING:
Returns True if this video is currently playing. (V6.0)

#ATTRPAUSED:
Return True if this video is currently paused. (V6.0)

#ATTRSCALEWIDTH:
Returns the current scale width set for the video using SetVideoSize(). (V6.0)

#ATTRSCALEHEIGHT:
Returns the current scale height set for the video using SetVideoSize(). (V6.0)

#ATTRSCALEMODE:
Returns the current scale mode set for the video using SetVideoSize(). (V6.0)

#ATTRLOADER:
Returns the name of the loader that was used to load this video. (V6.0)

Inputs
obj
type of object to query (see list above)
id
object identifier
attr
which information to return
param
optional: additional parameter required by some attributes (see above)
Results
info
the information you wanted
Example
width = GetAttribute(#DISPLAY, 0, #ATTRWIDTH)
The above code queries the display for its current width. As there is only one display, you do not have to specify an id.

Show TOC