WinSet 은 꽤 많이 쓰일 수 있는 명령어로써 유용한 명령어입니다.
오토핫키에서 제공하는 Gui,+ ~~~ 옵션 들중 AlWaysOnTop 이나 -caption 같은 거는 WinSet으로도 할수 있습니다.
WinSet의 형태는 이러합니다.
특성 부분은 특성 목록 그거 보고 하셔야 되는데
헬프파일에 있는거 그대로 올리겠습니다.
AlwaysOnTop, [On|Off|Toggle]: Makes a window stay on top of all other windows. Use ON to turn on the setting, OFF to turn it off, or TOGGLE to set it to the opposite of its current state. If omitted, it defaults to TOGGLE. The word Topmost can be used in place of AlwaysOnTop.
Bottom: Sends a window to the bottom of stack; that is, beneath all other windows. The effect is similar to pressing Alt-Escape. For example:
WinSet, Bottom,, WinTitle.
Top: Brings a window to the top of the stack without explicitly activating it. However, the system default settings will probably cause it to activate in most cases. In addition, this command may have no effect due to the operating system's protection against applications that try to steal focus from the user (it may depend on factors such as what type of window is currently active and what the user is currently doing). One possible work-around is to make the window briefly AlwaysOnTop, then turn off AlwaysOnTop.
Disable or Enable: Disables or enables a window (respectively). When a window is disabled, the user cannot move it or interact with its controls. In addition, disabled windows are omitted from the alt-tab list.
Redraw: Attempts to update the appearance/contents of a window by informing the OS that the window's rectangle needs to be redrawn. If this method does not work for a particular window, try WinMove. If that does not work, try the following:
Style,N or ExStyle,N: Changes the style or extended style of a window, respectively. If the first character of N is a plus or minus sign, the style(s) in N are added or removed, respectively. If the first character is a caret (^), the style(s) in N are each toggled to the opposite state. If the first character is a digit, the window's style is overwritten completely; that is, it becomes N.
ErrorLevel is set to 1 upon failure and 0 upon success. Failure occurs if the target window is not found or the style is not allowed to be applied (which happens more often on Windows 9x).
After applying certain style changes to a visible window, it might be necessary to redraw the window using
WinSet Redraw (see below). Finally, the styles table lists some of the common style numbers. Examples:
WinSet, Style, -0xC00000, A ; Remove the active window's title bar (WS_CAPTION). WinSet, ExStyle, ^0x80, WinTitle ; Toggle the WS_EX_TOOLWINDOW attribute, which removes/adds the window from the alt-tab list.
WinSet, Region [, Options, WinTitle, ...]
Changes the shape of a window to be the specified rectangle, ellipse, or polygon. If the Options parameter is blank, the window is restored to its original/default display area. Otherwise, one or more of the following options can be specified, each separated from the others with space(s):
Wn: Width of rectangle or ellipse. For example: w200
Hn: Height of rectangle or ellipse. For example: h300
X-Y: Each of these is a pair of X/Y coordinates. For example, 200-0 would use 200 for the X coordinate and 0 for the Y.
E: Makes the region an ellipse rather than a rectangle. This option is valid only when W and H are present.
R[w-h]: Makes the region a rectangle with rounded corners. For example, R30-30 would use a 30x30 ellipse for each corner. If w-h is omitted, 30-30 is used. R is valid only when W and H are present.
Rectangle or ellipse: If the W and H options are present, the new display area will be a rectangle whose upper left corner is specified by the first (and only) pair of X-Y coordinates. However, if the E option is also present, the new display area will be an ellipse rather than a rectangle. For example:
WinSet, Region, 50-0 W200 H250 E, WinTitle.
Polygon: When the W and H options are absent, the new display area will be a polygon determined by multiple pairs of X-Y coordinates (each pair of coordinates is a point inside the window relative to its upper left corner). For example, if three pairs of coordinates are specified, the new display area will be a triangle in most cases. The order of the coordinate pairs with respect to each other is sometimes important. In addition, the word Wind maybe be present in Options to use the winding method instead of the alternating method to determine the polygon's region.
ErrorLevel is set to 1 upon failure and 0 upon success. Failure occurs when: 1) the target window does not exist; 2) one or more Options are invalid; 3) more than 2000 pairs of coordinates were specified; or 4) the specified region is invalid or could not be applied to the target window.
See the bottom of this page for examples of how to use this command.
WinSet, Transparent, N, WinTitle
Makes a window semi-transparent. Specify for N a number between 0 and 255 to indicate the degree of transparency: 0 makes the window invisible while 255 makes it opaque. Transparency may be turned off completely for a window by specifying the word OFF. This is different than specifying 255 because it may improve performance and reduce usage of system resources.
Known Limitations for Transparent and TransColor:
- They have no effect on Windows 9x and NT4.
- They have no effect on a window that lacks a caption (title bar) and lacks the always-on-top property. For GUI windows, this can be solved by removing the caption only after making the window transparent. Alternatively, the following properties allow transparency to take effect:
Gui -Caption +ToolWindow.
- Setting "Transparent" to 255 prior to turning it off might avoid window redrawing problems such as a black background. If the window still fails to be redrawn correctly, see Redraw for a possible workaround.
- To change a window's existing TransColor, it may be necessary to turn off transparency before making the change.
Tip: To make the task bar transparent, use
WinSet, Transparent, 150, ahk_class Shell_TrayWnd. Similarly, to make the Start Menu transparent, follow this example:
DetectHiddenWindows, on WinSet, Transparent, 150, ahk_class BaseBar ; To make the Start Menu's submenus transparent, also include the script below.
To make all or selected menus on the entire system transparent, keep a script such as the following always running. Note that although such a script cannot make its own menus transparent, it can make those of other scripts transparent:
#Persistent SetTimer, WatchForMenu, 5 return ; End of auto-execute section. WatchForMenu: DetectHiddenWindows, on ; Might allow detection of menu sooner. IfWinExist, ahk_class #32768 WinSet, Transparent, 150 ; Uses the window found by the above line. return
WinSet, TransColor, Color [N], WinTitle
Makes all pixels of the chosen color invisible inside the target window, which allows the contents of the window behind it to show through (has no effect on Windows 9x and NT4). If the user clicks on an invisible pixel, the click will "fall through" to the window behind it. Specify for Color a color name or RGB value (see the color chart for guidance, or use PixelGetColor in its RGB mode). To additionally make the visible part of the window partially transparent, append a space (not a comma) followed by the transparency level (0-255). For example:
WinSet, TransColor, EEAA99 150, WinTitle
TransColor is often used to create on-screen displays and other visual effects. There is an example of an on-screen display at the bottom of the Gui page.
The word OFF may be specified to completely turn off transparency for a window. Both of the following are identical in function:
WinSet, Transparent, Off, WinTitle WinSet, TransColor, Off, WinTitle
Known Limitations: See the list above.
ErrorLevel is not changed by this command except where indicated above.
Although transparency is supported on Windows 2000/XP or later, retrieving the current transparency settings of a window is possible only on Windows XP or later (via WinGet).
A script's SplashText window can be made non-AlwaysOnTop via:
WinSet, AlwaysOnTop, Off, My Splash Window Title
Window titles and text are case sensitive. Hidden windows are not detected unless DetectHiddenWindows has been turned on.
주로 쓰는거는 TransColor 와 TransParent 라고 생각됩니다.
TransColor 는 특정 색을 투명하게 만들어 주는 것입니다.
TransParent 는 윈도우창을 투명하게 만들어 줍니다.
구이를 투명하게 또는 반투명하게 만들고 싶을때
TransColor 나 TransParent 로 반투명하게 만들 수 있습니다
WinSet, TransColor, EEAA99 150, WinTitle
위 내용은 헬프파일에 나와있는 내용입니다.
EEAA99 는 픽셀값을 의미하며 150은 투명도를 의미합니다.
WinSet 같은 명령어는 헬프파일을 보시고 공부하시는게 낳습니다.
'Autohotkey > 강좌' 카테고리의 다른 글
|[Autohotkey] 45. 숫자들을 무작위로 뽑다 - Random (0)||2013.06.09|
|[Autohotkey] 44. 특정 윈도우 창의 제목을 얻다 - WinGetTitle (0)||2013.06.09|
|[Autohotkey] 43. 특정 윈도우의 특성을 바꿔버리다 - WinSet (0)||2013.06.09|
|[Autohotkey] 42. 윈도우 창을 종료 시키다. - WinClose , WinKill (0)||2013.06.09|
|[Autohotkey] 41. 윈도우 창을 이동시키다 - Winmove (0)||2013.06.09|
|[Autohotkey] 40. 윈도우 창을 활성화한다. - WinActivate (0)||2013.06.09|
- JAVA 개발환경 구축 / JAVA 환경변수 등록
- C# ImageSearch
- 오토핫키 네이버 로그인
- C# LockBits
- C# .NET
- 윈도우 7 / 윈도우7 정품인증 / Window7 정품인증
- C# 이미지서치
- c# pixelSearch
- c# pixelgetcolor