How to take a screenshot and send it by email?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: How to take a screenshot and send it by email?
How can I make sure that the screenshot does not show black on top?
Re: How to take a screenshot and send it by email?
If you use "showAll" for the fullscreenmode, try this:
Code: Select all
...
export snapshot from rect(the rect of this card) to image "AuxImg" as PNG
...
Re: How to take a screenshot and send it by email?
It's even worse
-
- VIP Livecode Opensource Backer
- Posts: 7236
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: How to take a screenshot and send it by email?
You may need to use a calculated rectangle parameter for the screenshot:
You'll need to figure out the topleft and bottomright coordinates. Sometimes it's easier to use the corners of existing controls but it doesn't look like your card has any at the corners. You could probably calculate it by adding or subtracting pixels from controls that are near the corners. Or put a couple of invisible controls there to use as marker points (but that's an inelegant workaround.)
Code: Select all
export snapshot from rect "0,0,200,200" to file "Nav.jpg" as JPEG
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: How to take a screenshot and send it by email?
Hi,
Try to group the field and the the output area in a group, Then export snapshot on this group.
I think it will exactly show the area you want.
Regards
Terry Ho
Try to group the field and the the output area in a group, Then export snapshot on this group.
I think it will exactly show the area you want.
Regards
Terry Ho
-
- VIP Livecode Opensource Backer
- Posts: 135
- Joined: Tue Feb 23, 2010 10:53 pm
- Location: Saint Louis, Missouri USA
Re: How to take a screenshot and send it by email?
It seems there are two parts to this thread, 1) the correct snapshot rectangle and 2) how to attach an image to an email by script.
1) The globalLoc function will help you translate a local point to a screen coordinates. See the Dictionary.
Below is a button script that takes a snapshot of a card and puts a jpeg image on your desktop.
2) I couldn't get the revMail function (or even AppleScript) to attach the image so I can't help with that part.
Bob C
1) The globalLoc function will help you translate a local point to a screen coordinates. See the Dictionary.
Below is a button script that takes a snapshot of a card and puts a jpeg image on your desktop.
2) I couldn't get the revMail function (or even AppleScript) to attach the image so I can't help with that part.
Bob C
Code: 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