
lokipoki
Members-
Posts
19 -
Joined
-
Last visited
Everything posted by lokipoki
-
Thanks heaps. It works. But when I call now, for example, pcsx2 the gui is still on top and I cant see pcsx2. Should those lines kill the gui so that I can run pcsx2?! ;memory release _GDIPlus_MatrixDispose($hMatrix) _GDIPlus_GraphicsDispose($hBmp_Gfx) _GDIPlus_GraphicsDispose($hGUI_Gfx) _GDIPlus_GraphicsDispose($hBmp_Gfx_CD) _GDIPlus_ImageDispose($hBmp) _GDIPlus_ImageDispose($hBmp_CD) _GDIPlus_Shutdown() Thanks.
-
Its working now. But the cd (rotating image) is too small. How do I change the size and position?! Cheers mate.
-
Hi there again. Sorry to bother you but I went back to my script to test with various pictures. Here the script again: #include <GDIPlus.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> Run("D:\HTPC\Programs\nomousy\nomousy.exe /hide", "", @SW_HIDE) Run("D:\HTPC\Programs\autotaskbarhider\TaskBarHider.exe -hide -exit") $hGUI = GUICreate('MyGUI', @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP) GUICtrlCreatePic('ps2.jpg', 0, 0, @DesktopWidth, @DesktopHeight) GUISetState() _GDIPlus_Startup() $hBmp_CD = _GDIPlus_ImageLoadFromFile('D:\HTPC\Games\PS2\Roms\cartridge\' & $CmdLine[2] & '.png') $iWidth = _GDIPlus_ImageGetWidth($hBmp_CD) $iHeight = _GDIPlus_ImageGetHeight($hBmp_CD) $hGUI_Gfx = _GDIPlus_GraphicsCreateFromHWND($hGUI) $hBmp = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGUI_Gfx) $hBmp_Gfx = _GDIPlus_ImageGetGraphicsContext($hBmp) $hMatrix = _GDIPlus_MatrixCreate() _GDIPlus_MatrixTranslate($hMatrix, $iWidth / 2, $iHeight / 2) $inc = 0 $x = 1900 $y = 1250 Do _GDIPlus_MatrixRotate($hMatrix, 1) _GDIPlus_GraphicsSetTransform($hBmp_Gfx, $hMatrix) ;The CD is not at the Center perfectily, therefore some cliping would occur _GDIPlus_GraphicsDrawImage($hBmp_Gfx, $hBmp_CD, -$iWidth / 2, -$iHeight / 2) _GDIPlus_GraphicsDrawImage($hGUI_Gfx, $hBmp, @DesktopWidth / 2 -$iWidth, @DesktopHeight / 2 -$iHeight) _GDIPlus_GraphicsClear($hBmp_Gfx, 0x0000000) ;Make the Background equal to the background of the GUI Sleep(5) $inc = $inc + 1 Until $inc = 225 HotKeySet("{ESC}", "Terminate") If $CmdLine[0] == 2 Then GUICreate('MyGUI', @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_POPUP, $WS_EX_TOPMOST)) GUISetState() Run ( '"D:\HTPC\Games\PS2\Emulator\pcsx2-5569-windows-x86\pcsx2-r5569.exe" --nogui --fullscreen "' & $CmdLine[1] & '" --cfgpath="D:\HTPC\Games\PS2\Inis\' & $CmdLine[2] & '"', "D:\HTPC\Games\PS2\Emulator\pcsx2-5569-windows-x86\" ) Run("pssuspend XBMC.exe", "", @SW_HIDE) While 1 Sleep(100) WEnd EndIf Terminate Func Terminate() ProcessClose ( "pcsx2-r5569.exe" ) Run ( 'pssuspend -r XBMC.exe') WinSetState("XBMC","", @SW_MAXIMIZE) Run("D:\HTPC\Programs\nomousy\nomousy.exe", "", @SW_HIDE) Run("D:\HTPC\Programs\autotaskbarhider\TaskBarHider.exe -show -exit") Exit 0 EndFunc Here the picture I use: https://ncdnlw.bay.livefilestore.com/y2pvaDeNOjWvA1k9SHMAclvtFo8XjoKCibn4nMGkyzpqAZdBe_sJ_V8-QPvjNE-o0lXryZtThMKYGmAlvVzk6KW2L32-9A8mxYO0ovza9w3DlI/Jak%203.png?psid=1 Here the result: https://ncdnlw.bay.livefilestore.com/y2pYBInmdV-mVgF9UDnrK-9_YrV1kbAZyHfL7q5p453qy6Cyasy0LlNSb623H74MijJifHZZWlqozM9bJEchha-19nPJRwfZr5ZzzKj8ufzKNg/cd.jpg?psid=1 I tried several pictures with the same values such as *.png and 1:1 dimension. What could be the issue?! I really don't know what to do that's why I write here to seek for help. Thanks for help already gave me and would appreciate to help me on more time Cheers.
-
Thanks mate. Its working perfectly!!! Thanks for all your help guys. Cheers.
-
Thanks a lot. The script is working although it still flickers. But not as much as before. Cheers.
-
#include <GDIPlus.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> $hGUI = GUICreate('MyGUI', @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP) GUICtrlSetBkColor($hGUI, 0x000000) $hbpic = GUICtrlCreatePic('SNES.jpg', 0, 0, @DesktopWidth, @DesktopHeight) GUISetState() _GDIPlus_Startup() $hcartridge = _GDIPlus_ImageLoadFromFile('D:\HTPC\Games\SNES\Roms\cartridge\Batman Forever (E) [!].jpg') $iWidth = _GDIPlus_ImageGetWidth($hcartridge) $iHeight = _GDIPlus_ImageGetHeight($hcartridge) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) $inc = 0 $x = 625 $y = -75 Do $y = $y + 1 GUICtrlSetImage($hbpic, 'SNES.jpg') _GDIPlus_GraphicsDrawImage($hGraphic, $hcartridge, $x, $y) Sleep(15) $inc = $inc + 1 Until $inc = 135 While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd
-
Hi there. Thanks for your reply. It works indeed. But my moving picture starts to blink now. What can I do? Cheers.
-
How do I use GUICtrlSetImage???
-
Hi there. Here we go again. I want to move a picture. This is my code #include <GDIPlus.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> $hGUI = GUICreate('MyGUI', @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP) GUICtrlSetBkColor($hgui, 0x000000) GUICtrlCreatePic('SNES.jpg', 0, 0, @DesktopWidth, @DesktopHeight) GUISetState() _GDIPlus_Startup() $hcartridge = _GDIPlus_ImageLoadFromFile('D:\HTPC\Games\SNES\Roms\cartridge\Batman Forever (E) [!].jpg') $iWidth = _GDIPlus_ImageGetWidth($hcartridge) $iHeight = _GDIPlus_ImageGetHeight($hcartridge) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) $inc = 0 $x = 625 $y = -75 Do _GDIPlus_GraphicsDrawImage($hGraphic, $hcartridge, $x, $y) $y = $y + 1 Sleep(15) $inc = $inc + 1 Until $inc = 135 While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd This is the result after I mover the picture from the top. It makes those marks: https://skydrive.live.com/embed?cid=F6554FE8FA489447&resid=F6554FE8FA489447%21187&authkey=ACAyCLroOvnjYzU What am I doing wrong? Im pretty sure its simple
-
Hey. Thanks for help first of all. Can I play with $iWidth / $iHeight so that the cd (picture) gets smaller as it is spinning? Cheers.
-
Ok I fixed my script: #include #include #include $hGUI = GUICreate('MyGUI', @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP) GUICtrlCreatePic('ps2.jpg', 0, 0, @DesktopWidth, @DesktopHeight) GUISetState() _GDIPlus_Startup() $hGUI_Gfx = _GDIPlus_GraphicsCreateFromHWND($hGUI) $hBmp = _GDIPlus_BitmapCreateFromGraphics(300, 300, $hGUI_Gfx) $hBmp_Gfx = _GDIPlus_ImageGetGraphicsContext($hBmp) $hBmp_CD = _GDIPlus_ImageLoadFromFile('CD-PS2.png') $hMatrix = _GDIPlus_MatrixCreate() $iWidth = _GDIPlus_ImageGetWidth($hBmp_CD) $iHeight = _GDIPlus_ImageGetHeight($hBmp_CD) _GDIPlus_MatrixTranslate($hMatrix, $iWidth / 2, $iHeight / 2) Do _GDIPlus_MatrixRotate($hMatrix, 1) _GDIPlus_GraphicsSetTransform($hBmp_Gfx, $hMatrix) ;The CD is not at the Center perfectily, therefore some cliping would occur _GDIPlus_GraphicsDrawImage($hBmp_Gfx, $hBmp_CD, -$iWidth / 2, -$iHeight / 2) _GDIPlus_GraphicsDrawImage($hGUI_Gfx, $hBmp, @DesktopWidth / 2 -$iWidth, @DesktopHeight / 2 -$iHeight) _GDIPlus_GraphicsClear($hBmp_Gfx, 0x0000000) ;Make the Background equal to the background of the GUI Sleep(10) Until GUIGetMsg() = $GUI_EVENT_CLOSE This is the result: As you can see the cd is cut off. How do I fix it? And how do I move the cd making it smaller just like my very first script: _GDIPlus_MatrixTranslate($matrix, 150, 150) $inc = 0 $rx = 400 $ry = 400 $x = 500 $y = 250 Do _GDIPlus_MatrixRotate($matrix,1) _GDIPlus_GraphicsSetTransform($backbuffer,$matrix) _GDIPlus_GraphicsDrawImageRect($backbuffer,$image,-150,-150,300,300) _GDIPlus_GraphicsDrawImageRect($graphics,$bitmap,$x,$y,$rx,$ry) $x = $x + 1 $y = $y + 1 $rx = $rx - 1 $ry = $ry - 1 $inc = $inc + 1 Until $inc = 225 Cheers.
-
The white part around the disc stays white not transparent. Why?
-
I tried to script from PhoenixXL and your picture. But all I get is: https://skydrive.live.com/embed?cid=F6554FE8FA489447&resid=F6554FE8FA489447%21185&authkey=APxwoBpldhBriuE
-
But mine is in png format with a flat background colour...
-
What's difference between your pic and mine except my background is grey and yours is white? Cheers.
-
Hi there. Im kinda new to Autoit writing scripts. What I am trying to achieve is a back ground picture and a rotating png. I load the picture from xbmc. This my script: Opt("GuiOnEventMode", 1) $hwnd = GUICreate('MyGUI', @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_POPUP, $WS_EX_TOPMOST, $WS_EX_TRANSPARENT)) GUICtrlCreatePic('ps2.jpg', 0, 0, @DesktopWidth, @DesktopHeight) GUISetState() GUISetOnEvent(-3, "close") _GDIPlus_Startup() $graphics = _GDIPlus_GraphicsCreateFromHWND($hwnd) $bitmap = _GDIPlus_BitmapCreateFromGraphics(300, 300, $graphics) $backbuffer = _GDIPlus_ImageGetGraphicsContext($bitmap) $pen = _GDIPlus_PenCreate(0xFF00FF00, 2) InetGet('D:\HTPC\Games\PS2\Roms\cartridge\' & $CmdLine[2] & '.png') $image=_GDIPlus_ImageLoadFromFile ('D:\HTPC\Games\PS2\Roms\cartridge\' & $CmdLine[2] & '.png') $matrix = _GDIPlus_MatrixCreate() _GDIPlus_MatrixTranslate($matrix, 150, 150) $inc = 0 $rx = 400 $ry = 400 $x = 500 $y = 250 Do _GDIPlus_MatrixRotate($matrix,1) _GDIPlus_GraphicsSetTransform($backbuffer,$matrix) _GDIPlus_GraphicsDrawImageRect($backbuffer,$image,-150,-150,300,300) _GDIPlus_GraphicsDrawImageRect($graphics,$bitmap,$x,$y,$rx,$ry) $x = $x + 1 $y = $y + 1 $rx = $rx - 1 $ry = $ry - 1 $inc = $inc + 1 Until $inc = 225 The Issue: https://skydrive.live.com/embed?cid=F6554FE8FA489447&resid=F6554FE8FA489447%21184&authkey=AKCL7awCLgFIxQs The png is not transparent and I believe the code is not optional. What am I doing wrong? Cheers.
-
Hold 2 Buttons Tomorrow send a key
lokipoki replied to lokipoki's topic in AutoIt General Help and Support
Sorry again. I'm using the emulator with copies I own. Which is totally legal. But if that is against the rule it wasn't my intention to make anyone upset here. I should have read the rules before... -
Hold 2 Buttons Tomorrow send a key
lokipoki replied to lokipoki's topic in AutoIt General Help and Support
I want hold 2 Buttons because my HTPC has no keyboard Sorry, I wasn't aware of the emulation rule. Lets just say I want to send esc after I held 2 Buttons for 5 secs. Cheers. -
Hi there. I want to quit pcsx2 by holding 2 Buttons for lets say 5 seconds sending esc. Can you guys help me out with a script? Cheers.