Zohar Posted August 6, 2010 Share 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 6, 2010 Share 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 Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted August 6, 2010 Moderators Share 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 mLipok 1 Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 6, 2010 Share 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 Link to comment Share on other sites More sharing options...
Zohar Posted August 7, 2010 Author Share Posted August 7, 2010 very nice thank you, to both of you (: 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