Zohar 3 Posted August 6, 2010 (edited) Hello Let's say I have a webpage with 3 Textboxes, How can I know which 1 is currently Focused? Thank you Edited August 11, 2010 by Zohar Share this post Link to post Share on other sites
PsaltyDS 39 Posted August 6, 2010 You can test each one with: If $oTxtBox.hasFocus() Then Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
big_daddy 20 Posted August 6, 2010 You can use the activeElement property.#include <IE.au3> Global $sActiveElement = "", $sActiveElementOld = "" _IEErrorHandlerRegister() $oIE_form = _IE_Example("form") While __IEIsObjType($oIE_form, "browserdom") $sActiveElement = $oIE_form.document.activeElement.tagName If $sActiveElement <> $sActiveElementOld Then $sActiveElementOld = $sActiveElement ConsoleWrite("Tag Name of focused element: " & $sActiveElement & @CR) EndIf Sleep(100) WEnd 1 mLipok reacted to this Share this post Link to post Share on other sites
PsaltyDS 39 Posted August 6, 2010 You can use the activeElement property.Nice catch. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
Zohar 3 Posted August 7, 2010 very nice thank you, to both of you (: Share this post Link to post Share on other sites