Modify

#998 closed Feature Request (Rejected)

@VirtualDesktopWidth + @VirtualDesktopHeight + @DesktopMonitors

Reported by: Zedna Owned by: Valik
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:

Description

According to this topic
http://www.autoitscript.com/forum/index.php?showtopic=48530&st=15&p=367172&#entry367172

It will be good to add new macros

@VirtualDesktopWidth
@VirtualDesktopHeight

for multi monitor machines.

$SM_CXVIRTUALSCREEN = 78
$SM_CYVIRTUALSCREEN = 79

$VirtualDesktopWidth = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", $SM_CXVIRTUALSCREEN)
$VirtualDesktopWidth = $VirtualDesktopWidth[0]

$VirtualDesktopHeight = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", $SM_CYVIRTUALSCREEN)
$VirtualDesktopHeight = $VirtualDesktopHeight[0]

Maybe also:
@DesktopMonitors - number of display monitors on a desktop

$SM_CMONITORS = 80
$DesktopMonitors = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", $SM_CMONITORS)
$DesktopMonitors = $DesktopMonitors[0]

MSDN link for GetSystemMetrics:
http://msdn.microsoft.com/en-us/library/ms724385(VS.85).aspx

Attachments (0)

Change History (10)

comment:1 by Valik, on May 31, 2009 at 11:40:58 PM

I would rather see these implemented as UDFs. I think we should move away from macros in favor of functions particularly when it comes to what are essentially one-liners. AutoIt built-in stuff should be about doing things that it's hard to do using AutoIt. Not about providing all kinds of macros for things that are trivial.

comment:2 by Zedna, on Jun 1, 2009 at 11:46:53 AM

@Valik

I don't agree.

I think functions/macros/etc that may be widely/often used by scripters could be implemented as native ones.

But this is up to developers so what is general opinion of all/other developers on this?

comment:3 by Valik, on Jun 1, 2009 at 4:54:34 PM

Why, Zedna? So we can bloat the language with crap that anybody can implement themselves in 3 minutes?

Fundamentally you shouldn't care how a feature is implemented as long as it is available for you to use.

in reply to:  3 comment:4 by Zedna, on Jun 1, 2009 at 5:44:43 PM

Replying to Valik:

Why, Zedna? So we can bloat the language with crap that anybody can implement themselves in 3 minutes?

Fundamentally you shouldn't care how a feature is implemented as long as it is available for you to use.

I know what you mean and particularly I agree but consider
@DesktopWidth + @DesktopHeight - it's too simple "one line" UDF code but it's native.

I didn't mean to implement all stuff from GetSystemMetrics API, just above mentioned ones.

comment:5 by Valik, on Jun 1, 2009 at 8:11:01 PM

Your argument doesn't hold water. Back when those macros were added we didn't know what we were doing. There was no extensive UDF library back then. It was either built-in or you had to write it yourself. Now we have a rich UDF library which we take submissions to. Somebody can very easily sit down and write a "SystemInformation.au3" UDF library, fill it full of all kinds of useful functions (including duplicate many of the macros) and we'll have a very nice function-based library for getting system information. That would allow us to remove some macros that don't make sense to have as macros while causing no loss in functionality. Just a change in syntax. Back when the macros you mention were added, this wasn't an option.

comment:6 by Zedna, on Jun 1, 2009 at 9:16:13 PM

OK Valik. I will not tease you here with my different opinion anymore :-)

Rather I will post here submission for it as UDF - but not in way of whole "SystemInformation.au3" UDF library.

Thanks for all information provided.
It's good to know what kind of improvement we can expect/participate in AutoIt.

comment:7 by Jpm, on Jul 30, 2009 at 9:59:26 AM

Those macroes cannot be a good way to validate the positionning of a windows as multiple windows can have different size.
I will suggest we add a new function that can validate if x,y,w,h windows can be displayed

comment:8 by Jpm, on Oct 27, 2009 at 1:45:48 PM

Owner: set to Valik
Status: newassigned

comment:10 by trancexx, on Nov 7, 2011 at 7:37:43 AM

Resolution: Rejected
Status: assignedclosed

This is clearly UDF's job. Thank you guinness.

Modify Ticket

Action
as closed The owner will remain Valik.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.