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 » Tue Dec 18, 2012 11:24 pm

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: 2558
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: GetPubScreens()

Post by airsoftsoftwair » Fri Dec 21, 2012 9:40 pm

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: 80
Joined: Wed Feb 17, 2016 12:48 am
Location: Zdzieszowice, Poland
Contact:

Re: GetPubScreens()

Post by r-tea » Thu Jul 19, 2018 5:50 pm

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: 148
Joined: Sat Mar 26, 2016 11:44 am
Location: RNO
Contact:

Re: GetPubScreens()

Post by jPV » Fri Jul 20, 2018 7:12 am

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: 80
Joined: Wed Feb 17, 2016 12:48 am
Location: Zdzieszowice, Poland
Contact:

Re: GetPubScreens()

Post by r-tea » Fri Jul 20, 2018 7:54 pm

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

Post Reply