Jump to content
HyperSync, HyperList and FTP are now back online ×


  • Content Count

  • Joined

  • Last visited

Everything posted by samwyze

  1. I've been looking for a way to get more reliable results from an ir based input, do you have any suggestions/insight? Or do you think this is a dead-end route?
  2. Hi all, Looking awesome Blur Someone asked for the settings script/source, it's here: http://www.autohotkey.net/~dumpster.monkey/HyperPin/HyperFPLaunch/HyperSettings.ahk Feel free to update and fix it!
  3. WOW Just popped in to see what's happening, haven't had a look in months, been very busy with new job and still living in earthquake central (yes, we are still having quakes!) So glad to see that Blur has had the time (and patience ) to keep support and progress active. This is truly YOUR project now Blur Very impressed with your progress, and the fact you managed to stick with AHK standard Keep up the great work Sam
  4. Ah, got you on the monitor front - iirc there is an example script in the ahk standard help file that gets monitor numbers but dunno if it'd be any use, but yea better to just add the extra options with FP pause, just meant its easier to grab and draw all screens than to figure out which monitor is which.
  5. yep, thats right - think thats what I did in one of the hyperfplaunch alphas(used gdip to draw 'paused' FP). Also, I'm already reading Playfield_monitor (primary/secondary) from hyperpins setting ini - easier than adding another option For the pause you don't need to define a monitor, just grab all screens and draw them all too
  6. Cool, how about: pToken := Gdip_Startup() pBitmap := Gdip_BitmapFromScreen(1) Gdip_ImageRotateFlip(pBitmap, 2) ;rotate 180, flip 0 Gdip_SaveBitmapToFile(pBitmap, pfName) Gdip_DisposeImage(pBitmap) Gdip_Shutdown(pToken) to avoid the extra file write? I think pBitmap := Gdip_BitmapFromScreen() or pBitmap := Gdip_BitmapFromScreen(0) is all screens, pBitmap := Gdip_BitmapFromScreen(1) is monitor 1 pBitmap := Gdip_BitmapFromScreen(2) mon 2 etc...
  7. You posted while I was writing this - glad you found a workaround OK, I'll have a closer look tomorrow, I've got to get some sleep now! Possibly CreateBitmapFromClipboard is wrong coz I've never used it or ImageRotateFlip. In the mean time you could try along these lines (coz I forgot to drawimage before): pToken := Gdip_Startup() CaptureScreen(3,"",0) ;capture current monitor to clipboard pBitmap := Gdip_CreateBitmapFromClipboard() ;---or instead of those 2 lines------- pBitmap := Gdip_BitmapFromScreen() ;--------------then----------------- pBitmap2 := Gdip_ImageRotateFlip(pBitmap, 2) ;rotate 180, flip 0 Width := Gdip_GetImageWidth(pBitmap2), Height := Gdip_GetImageHeight(pBitmap2) G := Gdip_GraphicsFromImage(pBitmap2) Gdip_DrawImage(G, pBitmap2, 0, 0, Width, Height, 0, 0, Width, Height) Gdip_SaveBitmapToFile(pBitmap2, pfname) Gdip_DisposeImage(pBitmap), Gdip_DisposeImage(pBitmap2) Gdip_DeleteGraphics(G) Gdip_Shutdown(pToken) Ok, damn, must have been a fluke on my desktop
  8. @Blur, if you're playing with ahk, can you test if sending a left alt (or was it right?) to future pinball causes a pause without hiscores showing? I can't get future pinball running on my cab - having hassles with laptops onboard video and opengl and it just wont co-operate - it'll run a table (eventually) but at I'd say 1 or 2 frames per sec - no joke! Could be caused by my whacko dual monitor setup mind you, a second laptop (an old p3 I think) running MaxiVista dualscreen software serving as the backglass Anyway, the point was, I can't test FP stuff and wanted to see if that worked
  9. I'm using 1.45 from tic, If you just add those functions from previous post, you don't need to include gdip.ahk - that could be duplicate functions problem. If you're using gdip.ahk anyway (make sure it's 1.45) then you should be able to use capturescreen, just don't insert the other functions from my post (they're the parts of gdip.ahk that you need) p.s. I don't know when tic added the Gdip_ImageRotateFlip, must have been 1.44 or 1.45, but wish I'd seen it earlier - can probably eliminate 1/4 of my gdip code in current fplaunch if it works! RotateWorld is a pain, cause you need to get all the new dimensions from rotation etc... whereas ImageRotateFlip works on 90 degree turns so the math is done internally - at least that looks like how it's done oh yeah, sean+tic+skan=90% of my code
  10. It's not finished yet It's a work in progress I'll post the settings file today if you'd like - but it doesn't relate to the current FPLaunch in this thread, it's for the upcoming release - however, you could use it to configure HyperPin settings
  11. @Blur If you add these functions to wip4: ;##################################################################################### Gdip_CreateBitmapFromClipboard() { if !DllCall("OpenClipboard", "uint", 0) return -1 if !DllCall("IsClipboardFormatAvailable", "uint", 8) return -2 if !hBitmap := DllCall("GetClipboardData", "uint", 2) return -3 if !pBitmap := Gdip_CreateBitmapFromHBITMAP(hBitmap) return -4 if !DllCall("CloseClipboard") return -5 DeleteObject(hBitmap) return pBitmap } Gdip_CreateBitmapFromHBITMAP(hBitmap, Palette=0) { DllCall("gdiplus\GdipCreateBitmapFromHBITMAP", "uint", hBitmap, "uint", Palette, "uint*", pBitmap) return pBitmap } Gdip_GetImageDimensions(pBitmap, ByRef Width, ByRef Height) { DllCall("gdiplus\GdipGetImageWidth", "uint", pBitmap, "uint*", Width) DllCall("gdiplus\GdipGetImageHeight", "uint", pBitmap, "uint*", Height) } ; RotateNoneFlipNone = 0 ; Rotate90FlipNone = 1 ; Rotate180FlipNone = 2 ; Rotate270FlipNone = 3 ; RotateNoneFlipX = 4 ; Rotate90FlipX = 5 ; Rotate180FlipX = 6 ; Rotate270FlipX = 7 ; RotateNoneFlipY = Rotate180FlipX ; Rotate90FlipY = Rotate270FlipX ; Rotate180FlipY = RotateNoneFlipX ; Rotate270FlipY = Rotate90FlipX ; RotateNoneFlipXY = Rotate180FlipNone ; Rotate90FlipXY = Rotate270FlipNone ; Rotate180FlipXY = RotateNoneFlipNone ; Rotate270FlipXY = Rotate90FlipNone Gdip_ImageRotateFlip(pBitmap, RotateFlipType=1) { return DllCall("gdiplus\GdipImageRotateFlip", "uint", pBitmap, "int", RotateFlipType) } Gdip_SaveBitmapToFile(pBitmap, sOutput, Quality=75) { SplitPath, sOutput,,, Extension if Extension not in BMP,DIB,RLE,JPG,JPEG,JPE,JFIF,GIF,TIF,TIFF,PNG return -1 Extension := "." Extension DllCall("gdiplus\GdipGetImageEncodersSize", "uint*", nCount, "uint*", nSize) VarSetCapacity(ci, nSize) DllCall("gdiplus\GdipGetImageEncoders", "uint", nCount, "uint", nSize, "uint", &ci) if !(nCount && nSize) return -2 Loop, %nCount% { Location := NumGet(ci, 76*(A_Index-1)+44) if !A_IsUnicode { nSize := DllCall("WideCharToMultiByte", "uint", 0, "uint", 0, "uint", Location, "int", -1, "uint", 0, "int", 0, "uint", 0, "uint", 0) VarSetCapacity(sString, nSize) DllCall("WideCharToMultiByte", "uint", 0, "uint", 0, "uint", Location, "int", -1, "str", sString, "int", nSize, "uint", 0, "uint", 0) if !InStr(sString, "*" Extension) continue } else { nSize := DllCall("WideCharToMultiByte", "uint", 0, "uint", 0, "uint", Location, "int", -1, "uint", 0, "int", 0, "uint", 0, "uint", 0) sString := "" Loop, %nSize% sString .= Chr(NumGet(Location+0, 2*(A_Index-1), "char")) if !InStr(sString, "*" Extension) continue } pCodec := &ci+76*(A_Index-1) break } if !pCodec return -3 if (Quality != 75) { Quality := (Quality < 0) ? 0 : (Quality > 100) ? 100 : Quality if Extension in .JPG,.JPEG,.JPE,.JFIF { DllCall("gdiplus\GdipGetEncoderParameterListSize", "uint", pBitmap, "uint", pCodec, "uint*", nSize) VarSetCapacity(EncoderParameters, nSize, 0) DllCall("gdiplus\GdipGetEncoderParameterList", "uint", pBitmap, "uint", pCodec, "uint", nSize, "uint", &EncoderParameters) Loop, % NumGet(EncoderParameters) ;% { if (NumGet(EncoderParameters, (28*(A_Index-1))+20) = 1) && (NumGet(EncoderParameters, (28*(A_Index-1))+24) = 6) { p := (28*(A_Index-1))+&EncoderParameters NumPut(Quality, NumGet(NumPut(4, NumPut(1, p+0)+20))) break } } } } if !A_IsUnicode { nSize := DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, "uint", &sOutput, "int", -1, "uint", 0, "int", 0) VarSetCapacity(wOutput, nSize*2) DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, "uint", &sOutput, "int", -1, "uint", &wOutput, "int", nSize) VarSetCapacity(wOutput, -1) if !VarSetCapacity(wOutput) return -4 E := DllCall("gdiplus\GdipSaveImageToFile", "uint", pBitmap, "uint", &wOutput, "uint", pCodec, "uint", p ? p : 0) } else E := DllCall("gdiplus\GdipSaveImageToFile", "uint", pBitmap, "uint", &sOutput, "uint", pCodec, "uint", p ? p : 0) return E ? -5 : 0 } Gdip_DisposeImage(pBitmap) { return DllCall("gdiplus\GdipDisposeImage", "uint", pBitmap) } Gdip_Startup() { if !DllCall("GetModuleHandle", "str", "gdiplus") DllCall("LoadLibrary", "str", "gdiplus") VarSetCapacity(si, 16, 0), si := Chr(1) DllCall("gdiplus\GdiplusStartup", "uint*", pToken, "uint", &si, "uint", 0) return pToken } Gdip_Shutdown(pToken) { DllCall("gdiplus\GdiplusShutdown", "uint", pToken) if hModule := DllCall("GetModuleHandle", "str", "gdiplus") DllCall("FreeLibrary", "uint", hModule) return 0 } ;##################################################################################### then you should be able to take a screenshot using CaptureScreen, rotate it 180, then save to a file like this: pToken := Gdip_Startup() CaptureScreen(3,,0) ;capture current monitor to clipboard pBitmap := Gdip_CreateBitmapFromClipboard() pBitmap := Gdip_ImageRotateFlip(pBitmap, 2) ;rotate 180, flip 0 Gdip_SaveBitmapToFile(pBitmap, A_ScriptDir "\WhereEver\" tableTitle ".png") Gdip_DisposeImage(pBitmap) Gdip_Shutdown(pToken) (with a relevant variable for tableTitle of course) without the need for gdip.ahk theres some notes in the functions, I haven't tested but it's a start If you didn't want to do it with script, I second IrfanView - there are plenty of examples at ahk forums using it via ahk and command line
  12. part post deleted - shouldn't leave web page open while kids on holidays
  13. gdi+ with ahk will do this, just need to include gdip.ahk and read some of tics examples also, the CaptureScreen function from wip4 is using gdip to convert image format and could be modified to rotate 180 before saving...give me some time and I'll look at it
  14. I've been using it for the current wip, then been adding necessary changes to convert back to ahk_standard, as long as you stick with ansi, the only differences as far as the end user is concerned are added features, most of the bugs in ahk_l were ironed out long ago, hence why ahk_l is the main developement branch now. Ahh, so another ahk bug regards #IfWin hotkeys, why does that not surprise me! It's possible to remap keys using the Hotkey command for slamit with something like: Hotkey, $%StartKey%, sendS Hotkey, $%StartKey% Up, sendSUp ;... sendS: send {Blind} {s DownTemp} Return ;... sendSUp: send {Blind} {s Up} Return
  15. And no - I'm not being paid to promote ahk_l Sent from my FUSIONideos using Tapatalk
  16. Don't quite understand - aren't the only hotkeys that use :: wrapped in #IfWinActive already in wip4? Side note, the ahk_l has an #If command that can be use like #IfWin..., so #If Any valid expression...,could be handy
  17. If it was in wip4 it'll still be there - or was it a bugfix?
  18. Quick update: Just when I had it looking good for my setup, I had to go test UVP and B2S. Damn focus issues back - LOL Think I've got things wrapped up now though - gona be sending Blur a beta soon. That's right BETA, well at least it's outa APLHA
  19. Yep - in the future and definately not in the past We're getting there - Neither Blur nor I have alot of time at mo (work, families etc...) but we haven't stopped, just slowed! I'm thinking, after Future Pinball support is added we may just release it in it's unfinished state (example: service menu is non-functional, exit menu is being rewritten), as I believe users should be able to swap back to wip4 if there are major issues, without any hassle.
  20. Yea, I know I should, the only problem is - I'M LAZY! Maybe we should make that a pre-req - mapping exit key to e?
  21. Blur - was just re-reading thread and when you read from start to finish you really have been a champ, supporting user requests and working through bugs - so WELL DONE
  22. Enjoy those fumes, hehe Glad centering is fixed - think we can actually change this so it ignores taskbar (if present) when centering so no one else will have the issue
  23. Cheers, I was looking at that trying to figure out why the %$@^ I put it in! Think I need to comment my code a bit more, haha
  24. Maybe try replacing this, from loading section: IfWinExist, Visual Pinball Player,, DMD ;Check if visual pinball is Ready { IfWinActive, Visual Pinball Player,, DMD ;Check if visual pinball is Ready { Break } To this: IfWinExist, ahk_class VPPlayer ;Check if visual pinball is Ready { WinActivate, ahk_Class VPPlayer IfWinActive, ahk_class VPPlayer { ControlClick,, ahk_Class VPPlayer Break }
  • Create New...