litlmike Posted March 7, 2006 Author Share Posted March 7, 2006 That's a great idea I read the help file, and took a look at the examples but can't quite figure out how I should use it, ControlGetPos. Any Ideas?Clicks the Edit1 control 10 x's all at the same time, is that what your trying to achieve?I just did it to be overdramatic to see if it would work. It didn't.ACT! is a rather cumbersome database anyway (comparatively speaking)... why did you guys chose that platform rather than the others out there?I have no freakin' idea! It sucks compared to other databases, and its not even SQL-based!Thanks again for the help everyone. I am still trying to crack this case. _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted March 7, 2006 Moderators Share Posted March 7, 2006 I read the help file, and took a look at the examples but can't quite figure out how I should use it, ControlGetPos. Any Ideas?I believe he was talking about _ControlGetHandleByPos() that LxP also wrote. Link to comment Share on other sites More sharing options...
litlmike Posted March 7, 2006 Author Share Posted March 7, 2006 I believe he was talking about _ControlGetHandleByPos() that LxP also wrote.Doh! Sorry about that. Hmm.. another problem. I am getting this error when I try LXP's examples:ERROR: _ControlGetHandleByPos(): undefined function.$hControl = _ControlGetHandleByPos("Run", "", 54, 18)I copied _ControlGetHandleByPos.au3 into these folders to see if it helped.C:\Program Files\AutoIt3\IncludeC:\Program Files\AutoIt3\beta\includeSorry I don't know enough to answer these questions. _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
seandisanti Posted March 7, 2006 Share Posted March 7, 2006 Doh! Sorry about that. Hmm.. another problem. I am getting this error when I try LXP's examples: I copied _ControlGetHandleByPos.au3 into these folders to see if it helped. C:\Program Files\AutoIt3\Include C:\Program Files\AutoIt3\beta\include Sorry I don't know enough to answer these questions.are you explicitly including the copied files that contain that function? #include<whatever.au3>;at top of code Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 7, 2006 Moderators Share Posted March 7, 2006 (edited) Doh! Sorry about that. Hmm.. another problem. I am getting this error when I try LXP's examples:I copied _ControlGetHandleByPos.au3 into these folders to see if it helped.C:\Program Files\AutoIt3\IncludeC:\Program Files\AutoIt3\beta\includeSorry I don't know enough to answer these questions.Did you #include it?Top of Script:#include <_ControlGetHandleByPos.au3>Edit Sean beat me to it!! Edited March 7, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
litlmike Posted March 7, 2006 Author Share Posted March 7, 2006 Did you #include it? Top of Script: #include <_ControlGetHandleByPos.au3> Edit Sean beat me to it!! Wow that was dumb of me. Thanks Here is my code/results #include <_ControlGetHandleByPos.au3> #include <Process.au3> Local $hControl WinActivate("ACT!") WinWaitActive("ACT!","") $hControl = _ControlGetHandleByPos("ACT!", "Fake Company", 300, 230) If @error Then MsgBox(48, "_ControlGetHandleByPos() Example", "Something went wrong!") Else ControlSetText("Run", "", $hControl, "This control was found by its position.") EndIf I got "Something went wrong!". Any ideas? _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 7, 2006 Moderators Share Posted March 7, 2006 Try removing the 'Fake Company' and just use "" Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
litlmike Posted March 7, 2006 Author Share Posted March 7, 2006 Try removing the 'Fake Company' and just use ""Same results ;_( _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 7, 2006 Moderators Share Posted March 7, 2006 Ok, here's the solution.... Uninstall ACT!, and force them to buy a real database It's just hard to help you man... I mean we all want to, but we don't have the tools necessary to recreate what your going through. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
seandisanti Posted March 7, 2006 Share Posted March 7, 2006 Ok, here's the solution....Uninstall ACT!, and force them to buy a real database It's just hard to help you man... I mean we all want to, but we don't have the tools necessary to recreate what your going through.quitter. how sure are you of the coordinates you're passing to the function? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 7, 2006 Moderators Share Posted March 7, 2006 quitter. how sure are you of the coordinates you're passing to the function?Quitter?... Errr... I'm not gonna go there, was gonna hit below the belt !! But that is a good point: Checking maybe the Opt('MouseCoordMode', 'number in correspondence to autoinfo') Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
litlmike Posted March 7, 2006 Author Share Posted March 7, 2006 Ok, here's the solution.... Uninstall ACT!, and force them to buy a real database quitter. how sure are you of the coordinates you're passing to the function? Ha! I think you are both correct! I wish we had a new database! How sure of the coordinates? Hmm, well I assume they are correct, in that, if I use: MouseClick("left", 300, 230) It clicks in the Company field, which is correct. Is it possible that MouseClick("left", 300, 230) and _ControlGetHandleByPos("ACT!", "", 300, 230) are not the same? _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
LxP Posted March 8, 2006 Share Posted March 8, 2006 How sure of the coordinates? Hmm, well I assume they are correct, in that, if I use: MouseClick("left", 300, 230) It clicks in the Company field, which is correct. Is it possible that MouseClick("left", 300, 230) and _ControlGetHandleByPos("ACT!", "", 300, 230) are not the same?Quite possible. If my memory serves correctly, _ControlGetHandleByPos() requires that you pass the top-left position of the control. I wonder if this information is available via AutoIt Window Info? If not, then it shouldn't be hard to write a small script to display the positions/sizes of all controls on a window. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now