Recommendations for a Screen Capture utility on Win32
by Arthur Ogawa · in Torque Game Builder · 02/24/2007 (4:48 pm) · 2 replies
I have to document a manual I am writing (on the Gui Editor) with screen captures. It would be satisfactory to capture the whole window each time, but a requirement would be the ability to capture a screen where a menu is popped down with the mouse poised above one particular menu item.
Has anyone recommendations for doing this on Win32? Thanks for reading!
Has anyone recommendations for doing this on Win32? Thanks for reading!
About the author
#2
I had a feeling I would not be able to simply use the key binding you gave, because I am running the Mac OS version. So, I started by grepping the source for "screenshot". I found in ./games/common/gameScripts/common.cs: key is correct. Finally, I looked at the file ./games/common/gameScripts/screenshot.cs:
To get a screenshot, I press the key combination and the screenshot will be saved to my game's ./data/screenshots/ directory.
Sure enough, I shot the screen, and there was the file: ./data/screenshots/001-00000.png.
02/24/2007 (8:17 pm)
@Luke, thanks for the tip! I decided to look further into the built-in screenshot function.I had a feeling I would not be able to simply use the key binding you gave, because I am running the Mac OS version. So, I started by grepping the source for "screenshot". I found in ./games/common/gameScripts/common.cs:
GlobalActionMap.bind(keyboard, "ctrl p", doScreenShot);Then, I grepped "GlobalActionMap" and found in ./source/game/main.cc:
ActionMap* globalMap = new ActionMap;
globalMap->registerObject("GlobalActionMap");So, I consulted the documentation for class ActionMap and found the following two class methods:Quote:Then, I typed in at the console,
bind( device, action, [modifier spec, mod...], command )
getBinding( command ) -> device TAB action
==>echo(GlobalActionMap.getBinding(doScreenShot)); keyboard^cmd pAnd find that for me, the
function doScreenShot(%val) {
...
%name = expandFileName( "^game/data/screenshots/" @ formatSessionNumber
...And my investigation was complete:To get a screenshot, I press the
Sure enough, I shot the screen, and there was the file: ./data/screenshots/001-00000.png.
Torque 3D Owner Luke D
Default Studio Name