GetPubScreens()

Feature requests for future versions of Hollywood can be voiced here
Post Reply
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

GetPubScreens()

Post by djrikki »

Hello,

I would like this command to be extended so I can find out a little bit more about the public screens that are open. In particular I'd like to be able to find how whether the screen is 32-bit etc so I can restrict Jack to only open on screens that match this criteria.

EDIT: Also being able to find out the Width and Height would also be invaluable. I realise I can find this out via GetAttribute(#DISPLAY, 0, #ATTRHOSTWIDTH), but this 'after' I've already promoted the application to the screen.

EDIT2: I don't believe that GetAttribute() and #HOSTWIDTH is even working correctly after performing a DebugPrint() of the current display on a public window. Its still reporting 1920 wide even though the screen is 1400.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: GetPubScreens()

Post by airsoftsoftwair »

djrikki wrote:Hello,
I would like this command to be extended so I can find out a little bit more about the public screens that are open. In particular I'd like to be able to find how whether the screen is 32-bit etc so I can restrict Jack to only open on screens that match this criteria.

EDIT: Also being able to find out the Width and Height would also be invaluable. I realise I can find this out via GetAttribute(#DISPLAY, 0, #ATTRHOSTWIDTH), but this 'after' I've already promoted the application to the screen.
Makes sense. I'll add these features.
EDIT2: I don't believe that GetAttribute() and #HOSTWIDTH is even working correctly after performing a debugprint() of the current display on a public window. Its still reporting 1920 wide even though the screen is 1400.
I cannot reproduce this. Do you have a very small example script that shows this issue?
User avatar
r-tea
Posts: 133
Joined: Tue Feb 16, 2016 11:48 pm
Location: Zdzieszowice, Poland
Contact:

Re: GetPubScreens()

Post by r-tea »

I need an example how the structure of the second GetPubScreen() returned table looks like. There's no example regarding that table.
I tried to read it like this:

Code: Select all

t,info = GetPubScreens()
For Local k=0 To ListItems(t)-1 Do DebugPrint(info[width], info[height], info[depth])
and I get output like this:

Code: Select all

Table: 0x272494d8 Table: 0x272494d8 Table: 0x272494d8
Table: 0x272494d8 Table: 0x272494d8 Table: 0x272494d8
There were two identical screens opened.
Why hex values? For what is the "Table:" prefix?
User avatar
jPV
Posts: 603
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: GetPubScreens()

Post by jPV »

Those values are in subtables per screen element, and you're missing that "main" element.

Code: Select all

t,info = GetPubScreens()
; This does the trick:
For Local k=0 To ListItems(t)-1 Do DebugPrint(info[k]["width"], info[k]["height"], info[k]["depth"])
; Or optionally:
For Local k=0 To ListItems(t)-1 Do DebugPrint(info[k].width, info[k].height, info[k].depth) 
User avatar
r-tea
Posts: 133
Joined: Tue Feb 16, 2016 11:48 pm
Location: Zdzieszowice, Poland
Contact:

Re: GetPubScreens()

Post by r-tea »

Thanks. It works as I expected. Worth to add it to Hollywood manual.
Post Reply