GrabDesktop - Possible bug

Discuss any general programming issues here
Post Reply
NathanH
Posts: 128
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

GrabDesktop - Possible bug

Post by NathanH »

Hi,
In previous Hollywood versions (I think 8) the following worked fine with no error:
blead=GrabDesktop(Nil, {X=cnt+FWIDTH, Y=sfloor, Width=FWIDTH, Height=FHEIGHT, PubScreen="Workbench Screen"})

Under 9.1 I get an error that it can't find the public screen and have to replace with:
blead=GrabDesktop(Nil, {X=cnt+FWIDTH, Y=sfloor, Width=FWIDTH, Height=FHEIGHT})

This works most of the time but I really need it to just use the workbench screen. Am I doing something wrong or is this a bug? I'm working with WinUAE, OS3.9, and Hollywod 9.1.

NathanH
NathanH
Posts: 128
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

Re: GrabDesktop - Possible bug

Post by NathanH »

Hi,

The PubScreen= attribute that the display opened on can be queried with:
SPUBLIC=GetAttribute(#DISPLAY, 1, #ATTRPUBSCREEN) ;public screen

SPUBLIC should be used instead of "Workbench Screen"

NathanH
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: GrabDesktop - Possible bug

Post by airsoftsoftwair »

NathanH wrote: Tue Feb 28, 2023 6:11 pm Hi,
In previous Hollywood versions (I think 8) the following worked fine with no error:
blead=GrabDesktop(Nil, {X=cnt+FWIDTH, Y=sfloor, Width=FWIDTH, Height=FHEIGHT, PubScreen="Workbench Screen"})

This works most of the time but I really need it to just use the workbench screen. Am I doing something wrong or is this a bug? I'm working with WinUAE, OS3.9, and Hollywod 9.1.
I'd need an MCVE to check that. But if you just want to grab the Workbench screen, why don't you just leave out the "PubScreen" tag? Or do you want to grab the Workbench screen while your script is running on a different screen?
NathanH
Posts: 128
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

Re: GrabDesktop - Possible bug

Post by NathanH »

Hi,

Thanks! Yes, I'm trying to capture small parts of Workbench and another public screen. If I don't use the PubScreen syntax it can capture the wrong part when I don't want it too.

NathanH
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: GrabDesktop - Possible bug

Post by airsoftsoftwair »

I think the public screen name of Workbench is "Workbench" not "Workbench screen". Have you tried that?
NathanH
Posts: 128
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

Re: GrabDesktop - Possible bug

Post by NathanH »

Hi,
Yes, that works; thanks. Scout said it was Workbench Screen.

Nathan
Post Reply