UndeadHarlequin Posted November 27, 2008 Share Posted November 27, 2008 (edited) In case of using Controllclick, what are the differences between Controllgethandle and wingethandle?? --Edit-- ( winactive is not winwait ,.XD)-- Edited November 27, 2008 by UndeadHarlequin Link to comment Share on other sites More sharing options...
martin Posted November 27, 2008 Share Posted November 27, 2008 In case of using Controllclick, what are the differences between Controllgethandle and wingethandle??--Edit-- ( winactive is not winwait ,.XD)--WInGetHandle gets the handle for a window, whereas ControlGetHandle gets the handle for a... wait for it... Control (oh you guessed didn't you.) A control is something like a button or a label or an edit in the window. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
UndeadHarlequin Posted November 27, 2008 Author Share Posted November 27, 2008 i didn´t guesse,.. and i didnt understand:-( Hmm ok i understood, that a controll is a button, lable, combobox or something like that. what the hell is a "wait 4 it"?? Where can i use the handle i got?, isnt it much easier to use the controll id classNN?? Isn´t it as identyfing as a controllhandle? Link to comment Share on other sites More sharing options...
ken82m Posted November 27, 2008 Share Posted November 27, 2008 (edited) Yes once you have a handle you can use it in place of the class instance etc For example: ControlSend ( $WindowHandle, "", $ControlHandle, "abcd") WinWait is pretty simple, did you look at the help file? It will simply pause your script until a window that matches the paramaters you specified exists. Kenny Edited November 27, 2008 by ken82m "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
UndeadHarlequin Posted November 27, 2008 Author Share Posted November 27, 2008 Hmm, but i only use the controlklick 4 each button once a time. ,. so i gona declare Many $vars, 4 same effect? or are there greate differents i cant see?:-) Link to comment Share on other sites More sharing options...
martin Posted November 27, 2008 Share Posted November 27, 2008 i didn´t guesse,.. and i didnt understand:-(Hmm ok i understood, that a controll is a button, lable, combobox or something like that.what the hell is a "wait 4 it"??Where can i use the handle i got?, isnt it much easier to use the controll id classNN??Isn´t it as identyfing as a controllhandle?Most of the time the ID is what you need. GuiGetMsg() gives the ID of the control which caused an event for example. You need the handle when you use certain API functions.ID's are allocated to controls in a given window as they are created and 2 different windows can have buttons which both have the ID of 13 say. Control handles are actually windows handles and are unique. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
ken82m Posted November 27, 2008 Share Posted November 27, 2008 Usually you get handles if your going to use windows and/or controls more than once. Unless you wanted to verify all the controls existing ahead of time. If it's just one click for each button. just get your window handle and then issue your controlclick() using the window handle and the control information from the AutoIT Window Info Tool. I usually use the "Advanced (Class)", but you can comine multiple properties too if you want. Kenny "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
UndeadHarlequin Posted November 27, 2008 Author Share Posted November 27, 2008 ah,.. so it is only 4 using button more ofthan then once a time. If i send only one command it is "stupid" to use the controllhandle, isnt it? in this case:-) THANKS Link to comment Share on other sites More sharing options...
ken82m Posted November 27, 2008 Share Posted November 27, 2008 (edited) Exactly. Like I said you still might use it if for whatever you needed to make sure all the controls were there before starting. You could do this: $Control1 = ControlGetHandle ( $WinHandle, "", "....controlinfo" ) $Control2 = ControlGetHandle ( $WinHandle, "", "....controlinfo" ) If $Control1 = "" OR $Control2 = "" Then MsgBox(0,"","Control Missing") Kenny Edited November 27, 2008 by ken82m "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." 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