question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could the `screenWidth` and `screenHeight` fields be exposed?

See original GitHub issue

My use case involves resizing a window to a fraction of the current screen’s dimensions. To this end, It would be nice to have the screenWidth and screenHeight fields exposed from the screen API.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lesterfancommented, May 29, 2020

SysGet functionality would be perfect!

Additionally, getting a handle to the active monitor like in @idbrii’s case seems to be a really common use case which is not easy to implement. Having an API call specifically for that would be amazing, but I’m not sure if that’s within the scope of this library.

1reaction
idbriicommented, May 29, 2020

A_ScreenWidth/Height gives you the dimensions of the primary monitor, but to get other monitors or the entire desktop (spanning monitors), you need to use SysGet. SysGet covers more use cases, so it’d be preferable to me!

In my AutoHotkey scripts, I use SysGet to find the active monitor, position windows at edges of monitors, and change layout based on the number of monitors and which is primary. (So I use Monitor MonitorCount MonitorPrimary and MonitorWorkArea.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can an html element fill out 100% of the remaining ...
This is the simplest answer, as you don't need to set the height of all the parent elements to 100%. Here's the current...
Read more >
[Chapter 42] 42.6 Screen Size Testing Files
42.6 Screen Size Testing Files. How many lines and columns are there on your screen or window? The answer can be important to...
Read more >
Screen.width and Screen.height wrong for iPad in IDE?
I've got an iPhone project in U3.0 and the game tab screen is set to iPad resolution (1024x768). When I read Screen.width and...
Read more >
Screen.width - Web APIs - MDN Web Docs - Mozilla
The Screen.width read-only property returns the width of the screen in CSS pixels.
Read more >
Chapter 2: Video Flashcards | Chegg.com
The closest viewer should be no closer than 1 times the screen width. If the nearest viewers are located too close to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found