Re: How to take a screenshot and send it by email?
Posted: Wed Apr 06, 2022 8:01 pm
How can I make sure that the screenshot does not show black on top?
Questions and answers about the LiveCode platform.
https://forums.livecode.com/
Code: Select all
...
export snapshot from rect(the rect of this card) to image "AuxImg" as PNG
...Code: Select all
export snapshot from rect "0,0,200,200" to file "Nav.jpg" as JPEGCode: Select all
on mouseUp pButtonNumber
put the rectangle of this card into tCardRectOrig
put toScreenCoordinates(tCardRectOrig) into tCardRect
put specialFolderPath("desktop") into tFolderPath
put tFolderPath & "/SnapShotTest.JPEG" into tFilePath
export snapshot from rectangle tCardRect to file tFilePath as JPEG
launch document tFilePath
beep
end mouseUp
function toScreenCoordinates pCardRect
put pCardRect & return into message box
--put "Unadjusted: " & pCardRect & return into message box
put globalLoc("0,0") into tGlobalLoc --see Dictionary
--put "Global Loc: " & tGlobalLoc & return after message box
put item 1 of tGlobalLoc into tHorizontalShift
put item 2 of tGlobalLoc into tVerticalShift
add tHorizontalShift to item 1 of pCardRect
add tVerticalShift to item 2 of pCardRect
add tHorizontalShift to item 3 of pCardRect
add tVerticalShift to item 4 of pCardRect
--put "Adjusted: " & pCardRect & return after message box
return pCardRect
end toScreenCoordinates