GUIScreenShot[interface]
generates a graphic that captures the current state of the runtime user interface.
GUIScreenShot
GUIScreenShot[interface]
generates a graphic that captures the current state of the runtime user interface.
更多信息和选项
- To use GUIScreenShot, you first need to load GUIKit using Needs["GUIKit`"].
- interface can be a GUIObject, a J/Link Java user interface object, an interface expression, or a name of a widget definition.
- When the argument is a GUIObject, the state of the interface is captured and left unchanged.
- When the argument is a widget definition expression, it is created, captured, and then closed.
- When the argument is a widget, a screen shot is generated of only the requested widget, without the underlying native window.
- When the argument consists of screen coordinates of the form {{xmin,xmax},{ymin,ymax}}, a rectangle from the current screen is captured.
- When no arguments are given, the contents of the entire screen are captured.
- GUIScreenShot is useful for creating previews of a definition within a notebook, documenting changes during the runtime of an interface, and also as an easy way of exchanging and submitting bug and problem reports to others.
范例
打开所有单元 关闭所有单元基本范例 (1)
Needs["GUIKit`"]ref = GUIRun["Wolfram/Example/PrimeFinder"]Take a screen shot of the original interface:
GUIScreenShot[ref]Change the value and take another screen shot:
"WidgetNames" /. GUIInformation[ref]ref @ SetPropertyValue[{"valueField", "text"}, ToString[6!, InputForm]]GUIScreenShot[ref]Take a screen shot of just a widget:
GUIScreenShot[ref @ WidgetReference["valueField"]]Capture a portion of the current screen:
GUIScreenShot[{{100, 150}, {200, 450}}]GUIScreenShot[]Scope (1)
Needs["GUIKit`"]GUIScreenShot works with any active user interface JavaObject produced by any J/Link code:
ref = GUIRun["Wolfram/Example/PrimeFinder"]obj = ref @ WidgetReference["previousButton"]GUIScreenShot[obj]相关指南
文本
Wolfram Research (2007),GUIScreenShot,Wolfram 语言函数,https://reference.wolfram.com/language/GUIKit/ref/GUIScreenShot.html.
CMS
Wolfram 语言. 2007. "GUIScreenShot." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/GUIKit/ref/GUIScreenShot.html.
APA
Wolfram 语言. (2007). GUIScreenShot. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/GUIKit/ref/GUIScreenShot.html 年
BibTeX
@misc{reference.wolfram_2026_guiscreenshot, author="Wolfram Research", title="{GUIScreenShot}", year="2007", howpublished="\url{https://reference.wolfram.com/language/GUIKit/ref/GUIScreenShot.html}", note=[Accessed: 11-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_guiscreenshot, organization={Wolfram Research}, title={GUIScreenShot}, year={2007}, url={https://reference.wolfram.com/language/GUIKit/ref/GUIScreenShot.html}, note=[Accessed: 11-September-2026]}