options - set top v...
 
Notifications
Clear all

We had a major storm through here recently and we suffered damage to the house roof and ceilings. I just received the quote to repair. I’m hoping that a small fraction of the 80,000 odd people that download SDIO and/or Desktop Info every month won’t mind chipping in a few dollars to help out. Click on the big blue button at the bottom of the page to help us keep a roof over our heads, literally!

Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.

options - set top value dynamically (and updating)

8 Posts
2 Users
0 Reactions
1,360 Views
(@wolly300)
Active Member Registered
Joined: 7 months ago
Posts: 4
Topic starter  

Hello together,

 

I have 2 problems I'm struggling with right now.

1. We use DesktopInfo on all of clients and with different screen sizes. Based on the background picture, the information should appear 70% below top. I saw this thread ( https://www.glenn.delahoy.com/community/desktop-info/scaling-with-4k-or-high-resolution-displays/ ) and tried to setup something similar but couldn't get it working:

 

[options]
BEGIN-ONLOAD
MONITOR=set:resy=%5
SET topvalue={{(%resy% * 70) / 100}}[1.0d]
END-ONLOAD
#top=%topvalue%
#top={{(917 * 70) / 100}}[1.0d]
#top=70% would be nice to have

 

I used the same code in the items block and it worked, so I'm confused why it's not working in the options block?

 

2. After getting this working, the top value should be continually be updated (connecting your notebook to 4K monitor, ...) so it always fits.

3. I couldn't get the calculation working with the 0.70 value:

{{%resy%* 0.7}}[1.0d]

Thx for helping 🙂


   
Quote
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1834
 

Version?


   
ReplyQuote
(@wolly300)
Active Member Registered
Joined: 7 months ago
Posts: 4
Topic starter  

latest 3.20.1


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1834
 

Posted by: @wolly300

latest 3.20.1

Good.

1. Because it belongs in the items section.

2/3. The following works for me:

MONITOR=interval:5, set:topvalue={{Trunc(%5*0.7)}}, hidden:1
OPTIONS=interval:5, form-top:%topvalue%

 


   
ReplyQuote
(@wolly300)
Active Member Registered
Joined: 7 months ago
Posts: 4
Topic starter  

Glenn, thank you so much. I got it working. But for me it's not working with

Trunc(%5*0.7)

I need to use:

(%5*70)/100

otherwise I don't get any value.

 

 

Another question, is it possible to have a dynamic width adjustment?

 

Following use case:

My DesktopInfo looks like this:

information1     value1      | right screen border

information2     value2      | right screen border 

information3     value3      | right screen border

 

Currently the width is fix set to 700 and right to 50. When value2 is getting longer and/or the font-size is changing based on the screen resolution. The 700 is not always working and I would like to set the width based on the real form-content width.


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1834
 

OPTIONS can do that. page 114.


   
ReplyQuote
(@wolly300)
Active Member Registered
Joined: 7 months ago
Posts: 4
Topic starter  
I have red the pages 114 and related, but to be honest, I don't really understand how to get it working.

   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1834
 

I suspect from what little you've explained, that what you want can't be done. However I suggest you try to map out your goals in as much gory detail as possible.


   
ReplyQuote
Glenn's Page