Jump to content

GUICreate options in not the common order

Recommended Posts

Alright I don't want to throw a wrinkle into too many people's scripts but it is my belief that GuiCreate has the wrong order of the options.


GUICreate ( "title" [, width [, height [, left [, top [, style [, exStyle [, parent]]]]]]] )

I think it should be

GUICreate ( "title" [, left [, top [, width [, height [, style [, exStyle [, parent]]]]]]] )

This is the current order of all the other GUI Functions. Just thought it should be the same.


Link to post
Share on other sites

I brought this up once a long time ago. JP (correctly) pointed out to me that you use the width and height a billion times more than you use the x and y coordinates. In fact, every single GUI must have a width and a height, but I bet you that 95% of those written by people do not use the x and y coordinates. So although on paper (monitor, whatever), it looks inconsistent, when you actually use it, it feels natural and makes sense. If it doesn't make sense, then try this function out and see how many times you pass -1 for the x and y coordinates:

Func _GUICreate($sTitle, $x = -1, $y = -1, $w = -1, $h = -1, $nStyle = -1, $nEx = -1, $hParent = 0)
    GUICreate($sTitle, $w, $h, $x, $y, $nStyle, $nEx, $hParent)

Edit: Fixed mistake in code.

Edited by Valik
Link to post
Share on other sites

I agree completely so then the idea is that on controls we use x, y more often so it is first?

Inconsistent but efficient.

Works for me.



We try to be consistent but effiency is first for AutoIt :lmao:
Link to post
Share on other sites

It confused me at first too. But when I started making more scripts I found that it was perfect for what I needed although strange.

Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote]

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...