FileRead with option "RAW" - not working?

Issue #82 closed
Winter Laite created an issue

I’m not certain the AHK code is working correctly, but it does report the size of ‘bufw’.

MyGui := Gui()
MyScLabel := MyGui.Add("Text", "w300", "Get saved screenclip")
MyScBtn := MyGui.Add("Button", "w300 h25 x10 y+10 +Default", "Press to get screenclip")
MyScBtn.OnEvent("Click", GetMyClip)
MyGui.Show()


GetMyClip(*) {
ClipSaved := ClipboardAll()
Clipboard := ""
bufw := FileRead(A_Desktop "\MyScreenClip.png", "RAW")
MsgBox(bufw.Size)
Clipboard := bufw
}

With similar Keysharp code the MsgBox displays nothing.

MyGui := Gui()
MyScLabel := MyGui.Add("Text", "w300", "Get saved screenclip")
MyScBtn := MyGui.Add("Button", "w300 h25 x10 y+10 +Default", "Press to get screenclip")
MyScBtn.OnEvent("Click", "GetMyClip")
MyGui.Show()


GetMyClip() {
ClipSaved := ClipboardAll()
Clipboard := ""
bufw := FileRead(A_Desktop "\MyScreenClip.png", "RAW")
MsgBox(bufw.Size)
Clipboard := bufw
}

Comments (4)

  1. Log in to comment