Thank you for your time!
Code: Select all
i := 1
; PHOTO STICKER
this:
!^p::
i++
InputBox, pic, Photo Sticker, Enter .JPEG`n(v for clipboard)`n`nbedboy | bfastbutt | happyboy | hotboy | playboy | rgbboy`nrgbboy2 | sunmoon | tiredboy
if !pic
Return
else if pic = v
{
if DllCall("OpenClipboard", "ptr", 0) {
if DllCall("IsClipboardFormatAvailable", "uint", 2) {
hBitmap := DllCall("GetClipboardData", "uint", 2, "ptr")
} else return
DllCall("CloseClipboard")
}
Gui %i%: Add, Picture,hwndmypic, % "HBITMAP:*" hBitmap
controlgetpos,,,wh,ht,,ahk_id %mypic%
gui %i%: Destroy
if (wh > ht) {
Gui %i%: Add, Picture, x0 y0 w420 h-1, % "HBITMAP:*" hBitmap
} else {
Gui %i%: Add, Picture, x0 y0 w-1 h420, % "HBITMAP:*" hBitmap
}
Gui %i%: Show, w320 h320
Gui %i%: +Resize
;Gui %i%: +LastFound
;WinSet, Transparent, 127
Return
}
if !FileExist("C:\Users\Evo\Pictures\"pic+".jpeg")
Return
gui %i%: Add, Picture,hwndmypic, C:\Users\Evo\Pictures\%pic%.jpeg
controlgetpos,,,wh,ht,,ahk_id %mypic%
gui %i%: Destroy
if (wh > ht) {
Gui %i%: Add, Picture,x0 y0 w320 h-1, C:\Users\Evo\Pictures\%pic%.jpeg
} else {
Gui %i%: Add, Picture,x0 y0 w-1 h320, C:\Users\Evo\Pictures\%pic%.jpeg
}
Gui %i%: Show, w320 h320
Gui %i%: +Resize
;Gui %i%: +LastFound
;WinSet, Transparent, 127
Return