WoW:API TakeScreenshot: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page API TakeScreenshot to API TakeScreenshot without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<center>'''TakeScreenshot''' ''-Documentation by AlexanderYoshi-''</center>
<br>{{framexmlfunc|FrameXML/WorldFrame.lua}} __NOTOC__
 
 
TakeScreenshot();


Takes a screenshot.
Takes a screenshot.


TakeScreenshot();


----
== Parameters ==
;''Arguments''
=== Arguments ===


:''none''
:''none''


----
=== Returns ===
;''Returns''


:;nil
:;nil


----
 
;''Example''
== Example ==
  TakeScreenshot();
  TakeScreenshot();


;''Result''


----
== Details ==
;''Description''
 
: 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]].


: Takes a screenshot. It is saved as a Targa .tga file in the Screenshots folder of your World of Warcraft installation folder.
: 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.
{{Template:WoW API}}
::* SCREENSHOT_SUCCEEDED Called when a screenshot is successfully taken.

Latest revision as of 04:47, 15 August 2023


WoW API < TakeScreenshot

"I" iconThis function is implemented in Lua here FrameXML/WorldFrame.lua.


TakeScreenshot();

Takes a screenshot.


Parameters[edit]

Arguments[edit]

none

Returns[edit]

nil


Example[edit]

TakeScreenshot();


Details[edit]

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.