Modify

Opened 15 years ago

Closed 13 years ago

#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 Changed 15 years ago by Valik

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 Changed 15 years ago by Zedna

@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 follow-up: Changed 15 years ago by 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.

comment:4 in reply to: ↑ 3 Changed 15 years ago by Zedna

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 Changed 15 years ago by Valik

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 Changed 15 years ago by Zedna

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 Changed 15 years ago by Jpm

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 Changed 15 years ago by Jpm

  • Owner set to Valik
  • Status changed from new to assigned

comment:10 Changed 13 years ago by trancexx

  • Resolution set to Rejected
  • Status changed from assigned to closed

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Valik.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.