WoW:API TakeScreenshot: Difference between revisions
Jump to navigation
Jump to search
(Added note on related events that might be helpful.) |
|||
Line 1: | Line 1: | ||
{{framexmlfunc|FrameXML/WorldFrame.lua}} __NOTOC__ | |||
TakeScreenshot(); | |||
Takes a screenshot. | Takes a screenshot. | ||
== Parameters == | |||
=== Arguments === | |||
:''none'' | :''none'' | ||
=== Returns === | |||
:;nil | :;nil | ||
== Example == | |||
TakeScreenshot(); | TakeScreenshot(); | ||
== Details == | |||
: Takes a screenshot. | : Takes a screenshot. The format of the file saved can be controlled via /console commands or [[config.wtf]] settings. See the article on [[changing the screenshot format]]. | ||
: TakeScreenshot() is a blocking call. Once called the remainder of your Lua script is not executed. If you have script that you need to execute post screenshot you will need to use a state machine and subscribe to the OnUpdate event, or you will need to subscribe to the following events: | : TakeScreenshot() is a blocking call. Once called the remainder of your Lua script is not executed. If you have script that you need to execute post screenshot you will need to use a state machine and subscribe to the OnUpdate event, or you will need to subscribe to the following events: | ||
::* SCREENSHOT_FAILED Called when a screenshot fails. | ::* SCREENSHOT_FAILED Called when a screenshot fails. | ||
::* SCREENSHOT_SUCCEEDED Called when a screenshot is successfully taken. | ::* SCREENSHOT_SUCCEEDED Called when a screenshot is successfully taken. | ||
Revision as of 10:16, 29 May 2007
- This function is implemented in Lua here FrameXML/WorldFrame.lua.
TakeScreenshot();
Takes a screenshot.
Parameters
Arguments
- none
Returns
- nil
Example
TakeScreenshot();
Details
- Takes a screenshot. The format of the file saved can be controlled via /console commands or config.wtf settings. See the article on changing the screenshot format.
- TakeScreenshot() is a blocking call. Once called the remainder of your Lua script is not executed. If you have script that you need to execute post screenshot you will need to use a state machine and subscribe to the OnUpdate event, or you will need to subscribe to the following events:
- SCREENSHOT_FAILED Called when a screenshot fails.
- SCREENSHOT_SUCCEEDED Called when a screenshot is successfully taken.