Exporting snapshot from a fullscreen stack on second monitor

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Exporting snapshot from a fullscreen stack on second monitor

Post by magice » Sun Jan 20, 2013 6:54 pm

I have a strange situation. I have to be able to export a snapshot of an image area in a stack that is set to fullscreen on a second monitor.

Code: Select all

   
   get the topLeft of image "CombatView" of stack "CombatView"
   put it into rPicTopLeft
   get the bottomRight of image "CombatView" of stack "CombatView"
   put it into rPicBottomRight
    
   export snapshot from rect rPicTopLeft,rPicBottomRight  to file "CombatAreaRot.jpg" as JPEG
this works fine when the stack is fullscreened on the main monitor, but when i move the stack to the second monitor, and set it to fullscreen it breaks. It takes the snapshot from the area of the main monitor instead of the second monitor even though the image CombatVIew is on the second monitor when the image area is defined. How can I specify that "rect rPicTopLeft,rPicBottomRight" is on the second monitor?

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Re: Exporting snapshot from a fullscreen stack on second mon

Post by Thierry » Sun Jan 20, 2013 7:07 pm

magice wrote:

Code: Select all

   
   get the topLeft of image "CombatView" of stack "CombatView"
   put it into rPicTopLeft
   get the bottomRight of image "CombatView" of stack "CombatView"
   put it into rPicBottomRight
    
   export snapshot from rect rPicTopLeft,rPicBottomRight  to file "CombatAreaRot.jpg" as JPEG
this works fine when the stack is fullscreened on the main monitor, but when i move the stack to the second monitor, and set it to fullscreen it breaks. It takes the snapshot from the area of the main monitor instead of the second monitor even though the image CombatVIew is on the second monitor when the image area is defined. How can I specify that "rect rPicTopLeft,rPicBottomRight" is on the second monitor?
Hi,

Check ScreenRects (with an S) in the dictionary

HTH

Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Exporting snapshot from a fullscreen stack on second mon

Post by sturgis » Sun Jan 20, 2013 7:16 pm

Look at the screenrects in the dictionary. (I think thats the name of it) It returns info on the screenrects of any attached monitors.

Also, rather than define a rect, you might be able to just point to an object.

Code: Select all

export snapshot from image "CombatView" of stack "CombatView" 
will probably work.

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: Exporting snapshot from a fullscreen stack on second mon

Post by magice » Sun Jan 20, 2013 7:34 pm

sturgis wrote:Look at the screenrects in the dictionary. (I think thats the name of it) It returns info on the screenrects of any attached monitors.

Also, rather than define a rect, you might be able to just point to an object.

Code: Select all

export snapshot from image "CombatView" of stack "CombatView" 
will probably work.
Thank you, (both of you) I love it when a solution means simplifying the code instead of writing more.

Post Reply