Jump to content

computer in a mirror


Recommended Posts

i saw some code on the forum a while back that really fascinated me, it reads the monitor output and writes it back backwards. The problems are:

It's not full screen

Because it displays the area under your mouse, if you try and display the displayed area it freaks out

It's just buggy

So my objective here is to make it so your computer would look like it would if you were looking at it in a mirror... heres the code:

$total = @DesktopHeight + @DesktopWidth
Global $SRCCOPY = 0x00CC0020
Global $leave = 0 , $dll[3] , $size = $total

HotKeySet("{PAUSE}","leave")


$dll[1] = DllOpen ( "user32.dll")
$dll[2] = DllOpen ( "gdi32.dll")


While Not $leave
  Sleep(25)
  MAG()
WEnd

DllClose ( $dll[1] )
DllClose ( $dll[2] )

Func MAG()
  $DeskHDC = DLLCall("user32.dll","int","GetDC","hwnd",0)
  If Not @error Then
     $xy = MouseGetPos()
     If Not @error Then
        DLLCall("gdi32.dll","int","StretchBlt","int",$DeskHDC[0],"int",_
                    0,"int",0,"int",$size,"int",$size,"int",$DeskHDC[0],"int",_
                    $xy[0] + $size,"int",$xy[1],"int", "-" & $size ,"int", $size,_
                    "long",$SRCCOPY)
     EndIf
     DLLCall("user32.dll","int","ReleaseDC","int",$DeskHDC[0],"hwnd",0)
  EndIf
EndFunc

Func leave()
  $leave = 1
EndFunc

any improvements would be great, especially if they can fix any of the main problems listed above... Thx

Link to comment
Share on other sites

This will do the full screen reverse, but as there are no loops, it will execute the script and exit, leaving your display inverted, until you refresh or mouve the mouse.

$total = @DesktopHeight + @DesktopWidth
Global $SRCCOPY = 0x00CC0020
Global $leave = 0 , $dll[3] , $size = $total

HotKeySet("{PAUSE}","leave")


$dll[1] = DllOpen ( "user32.dll")
$dll[2] = DllOpen ( "gdi32.dll")


;While Not $leave
;  Sleep(25)
  MAG()
;WEnd

DllClose ( $dll[1] )
DllClose ( $dll[2] )

Func MAG()
  $DeskHDC = DLLCall("user32.dll","int","GetDC","hwnd",0)
  If Not @error Then
    ;$xy = MouseGetPos()
     $l = 0
     $t = 0
     If Not @error Then
        DLLCall("gdi32.dll","int","StretchBlt","int",$DeskHDC[0],"int",_
                    0,"int",0,"int",$size,"int",$size,"int",$DeskHDC[0],"int",_
                    $l + $size,"int",$t,"int", "-" & $size ,"int", $size,_
                    "long",$SRCCOPY)
     EndIf
     DLLCall("user32.dll","int","ReleaseDC","int",$DeskHDC[0],"hwnd",0)
  EndIf
EndFunc

Func leave()
  $leave = Exit
EndFunc

CheersNobby

Link to comment
Share on other sites

This will do the full screen reverse, but as there are no loops, it will execute the script and exit, leaving your display inverted, until you refresh or mouve the mouse.

doesn't work for me :lmao:

nothing happens!!

(running 3.1.0.9 on W98)

Edited by lupusbalo
Link to comment
Share on other sites

Finally someone whos after the same thing I am.

I started the topic that spawned this one.

The above example works for me but as already stated its only one freeze frame reversed.

Could this be made to happen in real time within a loop ?

Or could such a speed simply not be possible ?

Link to comment
Share on other sites

I just realised that even if you did nothing would work.

Take your desktop for example, the icons you had carefully lined up on the left hand side of your screen may appear to be on the right hand

side now, but clicking them will do u know good, adcept maby creating a patch of distortion for a second or so.

Nothing will work ur startbar, ur taskbar ect, everything will just be hidden behind a sheet of a flipped screenshot.

Unless someone actually has a way of flipping the screenoutput the above methoid should be abandoned

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...