Jump to content

GUICTRLGET-LEFT, TOP, WIDTH AND HEIGHT


rizaado
 Share

Recommended Posts

Func left($iControlID)
    Return ControlGetPos(GUICtrlGetHandle($iControlID), "", 0)[0]
EndFunc   ;==>left
Func top($iControlID)
    Return ControlGetPos(GUICtrlGetHandle($iControlID), "", 0)[1]
EndFunc   ;==>top
Func width($iControlID)
    Return ControlGetPos(GUICtrlGetHandle($iControlID), "", 0)[2]
EndFunc   ;==>width
Func height($iControlID)
    Return ControlGetPos(GUICtrlGetHandle($iControlID), "", 0)[3]
EndFunc   ;==>height

 

Link to comment
Share on other sites

ControlGetPos

?

Edited by MikahS
Coffee time

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

rizaado,

thanks for your contributions but it would fit better in AutoIt Snippets rather than in Example Scripts.

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

If you want I can make a website and post them there but rather I am going to post them here. This forum needs customization. Autoit needs new standart library(SL), one bigger than the current. If the SL don't have elementary things like getting left, top, width and height of gui control.......................I don't know what to say????????You must name the language HALFAUTOIT!

Edited by rizaado
Link to comment
Share on other sites

Because I don't feel it's my responsibility to write dumb wrappers such as this and add to the UDF library, thus bloating an already extensive library of user functions. If you want me to hold you hand then I am afraid this isn't the place for you, I mean we have done enough already to make your life that more comfortable. Or go away, learn C and then come back here. Maybe your attitude will be that much different. I know mine is.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Are you a big boy after getting the banner called "Developers"? Yes, I want you to hold my ... because I am going to make preprocessor of this programming language because I can ... I am using autoit but I see the problems it has. I wrote one thousand lines of code and I see the need of OOP, and modern things like for each loop. Maybe I am not professional but I see the things I want a closed to windows programming language to has... I don't see what is the connection to C programming language...? If I want to write low level code I am going to use C, so? If I want to use low level and high level things I am going to use C++11. But If I want to write high level only I have many choices...

Because I don't feel it's my responsibility to write dumb wrappers such as this and add to the UDF library, thus bloating an already extensive library of user functions. If you want me to hold you hand then I am afraid this isn't the place for you, I mean we have done enough already to make your life that more comfortable. Or go away, learn C and then come back here. Maybe your attitude will be that much different. I know mine is.

Edited by rizaado
Link to comment
Share on other sites

  • Moderators

rizaado,

In future, please post small wrapper functions like this in the Snippets folder as suggested above.

I am using autoit but I see the problems it has

Fine, then use the "feature request" section of Trac to tell the Devs about it.

Autoit needs new standart library(SL), one bigger than the current. If the SL don't have elementary things like getting left, top, width and height of gui control.......................I don't know what to say????????You must name the language HALFAUTOIT!

As you have been told several times in the 3 topics you have opened on essentially the same subject - ControlGetPos exists to do just that.  The function is native, not part of the "Standard Library", and I agree with guinness that adding single-use wrapper functions such as these to the standard UDFs would be a really good example of unnecessary "bloat".

Finally, please keep your replies civil, thanks - you are close to the limit with that last post.

M23

 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

rizaado,

With which part(s) of my post do you not agree?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Sorry @Melba23, but I had to reply, since this could be beneficial to someone interested in OOP within AutoIt. @rizaado should understand that Object Oriented Programming (OOP) is basically a programming paradigm, whereby the concept of objects can easily be mapped to a data structure such as an array. So yeah, that's the reason I have a green badge!

Moved example to here >> https://www.autoitscript.com/forum/topic/173803-oop-like-approach-in-autoit/

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

As you have been told several times in the 3 topics you have opened on essentially the same subject - ControlGetPos exists to do just that.  The function is native, not part of the "Standard Library", and I agree with guinness that adding single-use wrapper functions such as these to the standard UDFs would be a really good example of unnecessary "bloat".

Finally, please keep your replies civil, thanks - you are close to the limit with that last post.

M23

Melba23, I don't agree with the your whole comment . 

Sorry @Melba23, but I had to reply, since this could be beneficial to someone interested in OOP within AutoIt. @rizaado should understand that Object Oriented Programming (OOP) is basically a programming paradigm, whereby the concept of objects can easily be mapped to a data structure such as an array. So yeah, that's the reason I have a green badge!

Guinness, I think you are very wrong. I think that you have the green badge because you are policeman.

Guys, I think autoit needs new standart. And if it doesn't have one soon, I am not going to use it. It's simple. But nobody can write to me stupid comments... There are stupid answers, not stupid questions.

Edited by rizaado
Link to comment
Share on other sites

  • Developers

@rizaado, I am not sure what you like to accomplish with all these answers in "attack mode"  but can assure you you come across as an arrogant  bastard, which could partly be due to your language skills, but also think it is your attitude as well. Keep going like this and you will be banned from these forums.

my 2 cents,
Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Guinness attacked me. So you are wrong as well. I am in defence mode!

Fully understand: we are all wrong and you are right, but hope I've been clear!

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Tell me the forum rule that I broke and I am going to see when I went wrong. But from my joining this forum I fell like talking with enemies. Everbody is thinking that is knowing so much.... I am not making myself man but the forums are for help but not for speaking stupid and attacking things around against others.

Edited by rizaado
Link to comment
Share on other sites

  • Developers

Yea right:

So you think you can make these kind of statements and expect respect?
I am done debating with you on this.

Topic is locked as it is not worth to be at the top of the Examples forum and doesn't contain any useful information other than your stupid accusations towards respected members and not in the last place AutoIt3 itself.

Better not open another one on this topic and stop this behaviour or else I will ban your ass.

Jos
 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...