Sign in to follow this  
Followers 0
kor

how would I pass certain array element id's to a function?

20 posts in this topic

Here is my old code.

Func _Input($i0, $i1 = 0, $i2 = 0, $i3 = 0, $i4 = 0, $i5 = 0, $i6 = 0, $i7 = 0, $i8 = 0, $i9 = 0, $i10 = 0)
    GUICtrlSetState($i0, $GUI_DISABLE) ; required
    If $i1 <> 0 Then GUICtrlSetState($i1, $GUI_DISABLE) ; optional
    If $i2 <> 0 Then GUICtrlSetState($i2, $GUI_DISABLE)
    If $i3 <> 0 Then GUICtrlSetState($i3, $GUI_DISABLE)
    If $i4 <> 0 Then GUICtrlSetState($i4, $GUI_DISABLE)
    If $i5 <> 0 Then GUICtrlSetState($i5, $GUI_DISABLE)
    If $i6 <> 0 Then GUICtrlSetState($i6, $GUI_DISABLE)
    If $i7 <> 0 Then GUICtrlSetState($i7, $GUI_DISABLE)
    If $i8 <> 0 Then GUICtrlSetState($i8, $GUI_DISABLE)
    If $i9 <> 0 Then GUICtrlSetState($i9, $GUI_DISABLE)
    If $i10 <> 0 Then GUICtrlSetState($i10, $GUI_DISABLE)
EndFunc   ;==>_Input

The new way I am doing things is making each item part of an array. I'd like to do something similar to this.

Func _HideAllControls($aControls)
    For $i = 0 To UBound($aControls) - 1 Step 1
        GUICtrlSetState($aControls[$i], $GUI_HIDE)
    Next
EndFunc   ;==>_HideAllControls

But im wondering if there is a way to pass only certain array elements to the function.

So lets say I have 10 elements in an array, and I'd like "hide" elements 1, 3, 5, and 6. It would be nice to be able to do something like this

_HideControls(1, 3, 5, 6)

but im not sure how I my loop would know how to integrate those numbers and loop through while only performing an action on the array elements passed to the function?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Here is my old code.

Func _Input($i0, $i1 = 0, $i2 = 0, $i3 = 0, $i4 = 0, $i5 = 0, $i6 = 0, $i7 = 0, $i8 = 0, $i9 = 0, $i10 = 0)
GUICtrlSetState($i0, $GUI_DISABLE) ; required
If $i1 <> 0 Then GUICtrlSetState($i1, $GUI_DISABLE) ; optional
If $i2 <> 0 Then GUICtrlSetState($i2, $GUI_DISABLE)
If $i3 <> 0 Then GUICtrlSetState($i3, $GUI_DISABLE)
If $i4 <> 0 Then GUICtrlSetState($i4, $GUI_DISABLE)
If $i5 <> 0 Then GUICtrlSetState($i5, $GUI_DISABLE)
If $i6 <> 0 Then GUICtrlSetState($i6, $GUI_DISABLE)
If $i7 <> 0 Then GUICtrlSetState($i7, $GUI_DISABLE)
If $i8 <> 0 Then GUICtrlSetState($i8, $GUI_DISABLE)
If $i9 <> 0 Then GUICtrlSetState($i9, $GUI_DISABLE)
If $i10 <> 0 Then GUICtrlSetState($i10, $GUI_DISABLE)
EndFunc ;==>_Input

The new way I am doing things is making each item part of an array. I'd like to do something similar to this.

Func _HideAllControls($aControls)
For $i = 0 To UBound($aControls) - 1 Step 1
GUICtrlSetState($aControls[$i], $GUI_HIDE)
Next
EndFunc ;==>_HideAllControls

But im wondering if there is a way to pass only certain array elements to the function.

So lets say I have 10 elements in an array, and I'd like "hide" elements 1, 3, 5, and 6. It would be nice to be able to do something like this

_HideControls(1, 3, 5, 6)

but im not sure how I my loop would know how to integrate those numbers and loop through while only performing an action on the array elements passed to the function?

I'm guessing you can use the variable arguments functionality of AutoIt.

Func Example2()
    ; Sample scriptusing @NumParams macro
    Test_Numparams(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
EndFunc   ;==>Example2

Func Test_Numparams($v1 = 0, $v2 = 0, $v3 = 0, $v4 = 0, $v5 = 0, $v6 = 0, $v7 = 0, $v8 = 0, $v9 = 0, _
        $v10 = 0, $v11 = 0, $v12 = 0, $v13 = 0, $v14 = 0, $v15 = 0, $v16 = 0, $v17 = 0, $v18 = 0, $v19 = 0)
    #forceref $v1, $v2, $v3, $v4, $v5, $v6, $v7, $v8, $v9, $v10, $v11, $v12, $v13, $v14, $v15, $v16, $v17, $v18, $v19
    Local $val
    For $i = 1 To @NumParams
        $val &= Eval("v" & $i) & " "
    Next
    MsgBox(0, "@NumParams example", "@NumParams =" & @NumParams & @CRLF & @CRLF & $val)
EndFunc

You may need to be rethinking your algorithm.

Edit: junk

Edited by elektron

Share this post


Link to post
Share on other sites

kor,

I would use an array to pass the index number of the controls to change - here is a short example: ;)

#include <GUIConstantsEx.au3>

$hGUI = GUICreate("Test", 500, 500)

; Create controls and store ControlIDs in an array
Local $aControlID[10]
For $i = 0 to 9
    $aControlID[$i] = GUICtrlCreateLabel("Label " & $i, 10, 20 + ($i * 30), 200, 20)
    GUICtrlSetBkColor(-1, 0xFF0000)
Next

GUISetState()

Sleep(1000)

; Declare array with the index numbers of the controls to change
Local $aToChange[5] = [1, 3, 5, 7, 9]
; And pass the array to the function
_Change_Colour($aToChange)

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch

WEnd

Func _Change_Colour($aChangers)

    ; Run through the array of controls to change
    For $i = 0 To UBound($aChangers) - 1
        ; And change them
        GUICtrlSetBkColor($aControlID[$aChangers[$i]], 0x00FF00)
    Next

EndFunc

All clear? ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

So it sounds like in order to be able to pass elements to the function I would need to create a new temporary array that contains the element ID's, then perform the action on that new temporary array.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Another way as Melba

;Controls to hide
Local $aiHide[4] = [1,3,5,6]

Func _HideControls(Const $aControls, Const $aiHide)
    ; Iterate over each element in $aiHide
    For $value in $aiHide
        GUICtrlSetState($aControls[$aiHide[$value]], @SW_HIDE)
    Next
EndFunc
Edited by mechaflash213

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
Share on other sites

kor,

I would need to create a new temporary array that contains the element ID's

I believe that is the simplest way - otherwise you need to declare the function with umpteen parameters as in elektron's example. :)

Does this pose you a problem? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

To go off in a different direction, you can put groups surrounding controls...then your function would only need to include the group of controls to disable, instead of specifiying all those controls in the group. (of course, logic to find those controls is necessary in the function).

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

To go off in a different direction, you can put groups surrounding controls...then your function would only need to include the group of controls to disable, instead of specifiying all those controls in the group. (of course, logic to find those controls is necessary in the function).

Huh?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Huh?

lol I said the same thing. Only thing I can think of that he might be referencing is GUICtrlCreateGroup. That is not to say I see it as applicable. I don't see an easier way than what Melba has suggested.

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

To go off in a different direction, you can put groups surrounding controls...then your function would only need to include the group of controls to disable, instead of specifiying all those controls in the group. (of course, logic to find those controls is necessary in the function).

When you do a GUICtrlCreateGroup(), you're not programmatically "Grouping" the controls within it together. All you're doing is creating a border to give the visual aspect that they are "Grouped" together.

Edited by mechaflash213

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

yeap, GuiCtrlCreateGroup...the group has coords, the controls have coords, you can do the math

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

The math says you're going in the wrong direction suggesting a group control is going to help in any way shape or form for the OP's needs. Why in the world would you use a group controls location as the basis on which controls to disable? If you create the controls on the GUI yourself and can do it in multitude of ways that don't require knowing where the controls are.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

I don't see any harm in providing additional methods to solve what might be the potential problem; but go ahead, everyone attack :)


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

jdelaney,

And that is supposed to be serious suggestion? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

jdelaney,

Post an example script on doing this with 8 controls (just make 'em buttons) and setting controls 1-4 into group 1, 5 and 6 into group 2, and 7 and 8 into group 3.

Then I'll tell you to hide 1, 3,6,8 =P


Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
Share on other sites

touche, mecha...but what i've found in my own UIs, when I want to disable mutliple controls, it is because they have some sort of assocation, so i would logically group them together. Maybe I would think of changing my groups up if I needed to pick or choose one or two from mutliple groups


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

jdelaney,

I assumed that would be the case - and I do the same on occasion by just creating that group of controls in immediate succession and then running through their ControlIDs in a simple loop. ;)

But I use the array method I posted more often as I find I usually want to change the state of a different selection of controls depending on the action taken. And I then tend to use an associative array (this is my favourite) so that I can name them rather then use the index numbers. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

a method better than calculating the location of the controls by physically grouping them is programatically grouping them.

Local $aGroup1[4] = [GUICtrlCreate...(), GUICtrlCreate...(), GUICtrlCreate...(), GUICtrlCreate...()]
Local $aGroup2[2] = [... same way as above...]
Local $aGroup3[3] = [... same way as above...]

I also do this method to create cleaner GUI coding. I always find GUI coding to be quite messy...

$hGUI = GUICreate(...)
$aGroup1 = _BuildGroup(1)
$aGroup2 = _BuildGroup(2)
$aGroup3 = _BuildGroup(3)



Func _BuildGroup($iGroup)
  Switch $iGroup
    Case 1
      Local $a[4]
      $a[0] = GUICtrlCreate...()
      $a[1] = GUICtrlCreate...()
      $a[2] = GUICtrlCreate...()
      $a[3] = GUICtrlCreate...()
    Case 2
      Local $a[2]
      $a[0] = GUICtrlCreate...()
      $a[1] = GUICtrlCreate...()
    Case 3
      Local $a[2]
      $a[0] = GUICtrlCreate...()
      $a[1] = GUICtrlCreate...()
  EndSwitch

  Return $a
EndFunc

EDIT: Used a single local variable in function

Edited by mechaflash213

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

my bad, here it is...to addressmechaflash's challenge (i'm in no way saying this is more productive, just being difficult :) )

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)
$Group1 = GUICtrlCreateGroup("Group1", 8, 16, 177, 313)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Group2", 200, 16, 201, 313)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("Group3", 416, 16, 193, 313)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("Group4", 8, 32, 601, 49)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group5 = GUICtrlCreateGroup("Group5", 8, 104, 601, 49)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group6 = GUICtrlCreateGroup("Group6", 8, 168, 601, 49)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group7 = GUICtrlCreateGroup("Group7", 8, 248, 601, 49)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Dim $aButtons[8]
$aButtons[0] = GUICtrlCreateButton("Button1", 48, 48, 75, 25)
$aButtons[1] = GUICtrlCreateButton("Button2", 48, 120, 75, 25)
$aButtons[2] = GUICtrlCreateButton("Button3", 48, 184, 75, 25)
$aButtons[3] = GUICtrlCreateButton("Button4", 48, 264, 75, 25)
$aButtons[4] = GUICtrlCreateButton("Button5", 256, 120, 75, 25)
$aButtons[5] = GUICtrlCreateButton("Button6", 256, 184, 75, 25)
$aButtons[6] = GUICtrlCreateButton("Button7", 480, 120, 75, 25)
$aButtons[7] = GUICtrlCreateButton("Button8", 480, 184, 75, 25)
$iButton_Disable1 = GUICtrlCreateButton("Button9", 40, 376, 75, 25)
$Label1 = GUICtrlCreateLabel("Disable/Enable Group 1", 40, 352, 300, 17)
$Label2 = GUICtrlCreateLabel("Disable/Enable Group 4 and 6", 320, 352, 300, 17)
$iButton_Disable1and6 = GUICtrlCreateButton("Button10", 320, 376, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$bGroup1Enabled = True
$bGroup6Enabled = True
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $iButton_Disable1
If $bGroup1Enabled Then
    $setState = $GUI_DISABLE
    $bGroup1Enabled = False
Else
    $setState = $GUI_ENABLE
    $bGroup1Enabled = True
EndIf
ChangeState($setState, $Group1)
Case $iButton_Disable1and6
If $bGroup1Enabled Then
    $setState1 = $GUI_DISABLE
    $bGroup1Enabled = False
Else
    $setState1 = $GUI_ENABLE
    $bGroup1Enabled = True
EndIf

ChangeState($setState1, $Group4)
ChangeState($setState1, $Group6)
EndSwitch
WEnd
Func ChangeState ( $iCallersState, $iCallersGroup)
$aGroupPos = ControlGetPos ( $Form1, "", $iCallersGroup )
For $i = 0 To UBound ($aButtons) -1
$aButtonPos = ControlGetPos ( $Form1, "", $aButtons[$i] )
If $aGroupPos[0] < $aButtonPos[0] And _
$aGroupPos[1] < $aButtonPos[1] And _
$aGroupPos[0]+$aGroupPos[2] > $aButtonPos[0]+$aButtonPos[2] And _
$aGroupPos[1]+$aGroupPos[3] > $aButtonPos[1]+$aButtonPos[3] Then
GUICtrlSetState ( $aButtons[$i], $iCallersState)
EndIf
Next

EndFunc
Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

I was right, using the location of your group controls to determine which control to disable is way too much work for no benefit.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


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
Sign in to follow this  
Followers 0