-
Announcement
The HyperSpin 2 early access beta is here!
We’re starting the first public testing phase with Platinum Members to keep the scope manageable while we test the current feature set and begin to add more. In the future, we’ll provide a version for basic members as well. On behalf of the entire HyperSpin team, we look forward to another exciting adventure with our community.
samwyze
User-
Posts
87 -
Joined
-
Last visited
samwyze's Achievements
Newbie (1/14)
0
Reputation
-
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?
-
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
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! -
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
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 -
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
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. -
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
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 -
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
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... -
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
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 -
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
@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 -
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
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 -
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
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 -
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
@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 -
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
part post deleted - shouldn't leave web page open while kids on holidays -
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
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 -
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
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 -
FPLaunch MOD: Pause and Loading screens...
samwyze replied to samwyze's topic in Content and Support
And no - I'm not being paid to promote ahk_l Sent from my FUSIONideos using Tapatalk