Malkey Posted January 15, 2010 Posted January 15, 2010 Instead of going off topic here. I came across a curious behavior when replacing $WS_EX_TRANSPARENT with -1.Subsequently, a search of these forums did show the GUI exStyle $WS_EX_LAYOUTRTL has been demonstrated before.On my xp this script makes any window (Notepad window used here) appear as its mirror image including the text.#include <WinAPI.au3> #include <Constants.au3> #include <WindowsConstants.au3> Run("notepad.exe") WinActivate("Untitled - Notepad") WinWaitActive("Untitled - Notepad") $hWnd = WinGetHandle("Untitled - Notepad") WinMove("[CLASS:Notepad]", "", @DesktopWidth / 2 - 200, @DesktopHeight / 2 - 250, 400, 200) Local $ExS = _WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE) ; Existing extended style of the window. _WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, BitOR($ExS, $WS_EX_LAYOUTRTL)) _WinAPI_InvalidateRect($hWnd) Send("qwerty - 1234567890") MsgBox(0, "", "Continue") _WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, BitOR($ExS, $WS_EX_COMPOSITED, $WS_EX_LAYOUTRTL)) _WinAPI_InvalidateRect($hWnd) MsgBox(0, "", "Continue") _WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, $ExS) ; Back to original exStyle of the window. _WinAPI_InvalidateRect($hWnd) MsgBox(0, "", "End") $PID = ProcessExists("notepad.exe") If $PID Then ProcessClose($PID)
JohnOne Posted January 15, 2010 Posted January 15, 2010 Sounds ace, but does not work on win 7. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
UEZ Posted January 15, 2010 Posted January 15, 2010 (edited) Looks very interesting! This works also on Vista x32 and Win7 x64! #include <WinAPI.au3> #include <Constants.au3> #include <WindowsConstants.au3> $pid = Run("notepad.exe") Sleep(750) WinActivate("[CLASS:Notepad]", "") WinWaitActive("[CLASS:Notepad]") $hWnd = WinGetHandle("[CLASS:Notepad]") WinMove("[CLASS:Notepad]", "", @DesktopWidth / 2 - 200, @DesktopHeight / 2 - 250, 400, 200) Local $ExS = _WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE) ; Existing extended style of the window. _WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, BitOR($ExS, $WS_EX_LAYOUTRTL)) _WinAPI_InvalidateRect($hWnd) Send("qwerty - 1234567890") MsgBox(0, "", "Continue") _WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, BitOR($ExS, $WS_EX_COMPOSITED, $WS_EX_LAYOUTRTL)) _WinAPI_InvalidateRect($hWnd) MsgBox(0, "", "Continue") _WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, $ExS) ; Back to original exStyle of the window. _WinAPI_InvalidateRect($hWnd) MsgBox(0, "", "End") ProcessClose($PID) UEZ Edited January 15, 2010 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
jvanegmond Posted January 15, 2010 Posted January 15, 2010 The behavior is as described here: http://msdn.microsoft.com/en-us/library/aa913269.aspx github.com/jvanegmond
dmob Posted January 15, 2010 Posted January 15, 2010 Cool stuff... will use this to prank my employees.
picea892 Posted January 15, 2010 Posted January 15, 2010 I can see all those closet apple users liking this feature. Really strange.
JohnOne Posted January 15, 2010 Posted January 15, 2010 Looks very interesting!This works also on Vista x32 and Win7 x64!UEZHmmmI wonder why it dosent work on 32 bit win 7. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Fantastic Posted January 15, 2010 Posted January 15, 2010 HmmmI wonder why it dosent work on 32 bit win 7.Works just fine here (Win 7 Ultimate x86 ) [u]My current project:[/u] [size="1"]A bootable USB[/size]Webpage:*http://mylittlesoft.blogspot.com/
Michel Claveau Posted January 17, 2010 Posted January 17, 2010 Hi, all! It's OK, for me, on Win 7 32bits. (but UAC off and AV properly configured) @+
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now