Hello friends..
I have to work on a webpage too much in my office which requires my User Id again and again. I want to set my User id on it by making a hotkey. But here the problem is that the specific control’s classNN is not shown by window spy. On the other hand when I use another tool- AccViewer Source.ahk, then it shows the control’s information in it.
Please look at this image-
in the above image you can see that when I hover the mouse pointer on User ID field then window spy does not show the classNN of user ID field. It is showing internet explorer_server1 in classNN field, which is the classNN of entire web page. Moreover, I wrote 12345 in user ID field but window spy is showing no text.
Now look at this image-
Now in the second image you can see that I used AccViewer Source.ahk tool to get the information of controls of web page. It is showing value of the classNN of the control same i.e. internet explorer_server1, but here the interesting fact is that, it is showing value of control- 12345. On the other hand window spy is not retrieving the text of the specific control.
Please guide me how can I retrieve the text of the control whose classNN is not shown by window spy. I searched old threads regarding retrieving the classNN of specific controls which are not shown in window spy, but nothing seems to be helpful.
PLEASE HELP...
THANKS A LOT....
How to operate upon the control whose information is not shown by window Spy?
- Sabestian Caine
- Posts: 528
- Joined: 12 Apr 2015, 03:53
How to operate upon the control whose information is not shown by window Spy?
I don't normally code as I don't code normally.
- KuroiLight
- Posts: 327
- Joined: 12 Apr 2015, 20:24
- Contact:
Re: How to operate upon the control whose information is not shown by window Spy?
You can't get controls from a webpage using the native methods, youll need to find a lib specific to ie/webpage interaction.
Heres a older tutorial I found after a quick search thats relevant: https://autohotkey.com/board/topic/4705 ... -tutorial/
and a library that could retrieve such information: https://autohotkey.com/board/topic/7730 ... -09272012/
Heres a older tutorial I found after a quick search thats relevant: https://autohotkey.com/board/topic/4705 ... -tutorial/
and a library that could retrieve such information: https://autohotkey.com/board/topic/7730 ... -09272012/
Windows 10, Ryzen 1600, 16GB G.Skill DDR4, 8GB RX 480 | [MyScripts][MySublimeSettings] [Unlicense][MIT License]
01/24/18
[/color]- Sabestian Caine
- Posts: 528
- Joined: 12 Apr 2015, 03:53
Re: How to operate upon the control whose information is not shown by window Spy?
Thanks dear KuroiLIght.....KuroiLight wrote:You can't get controls from a webpage using the native methods, youll need to find a lib specific to ie/webpage interaction.
Heres a older tutorial I found after a quick search thats relevant: https://autohotkey.com/board/topic/4705 ... -tutorial/
and a library that could retrieve such information: https://autohotkey.com/board/topic/7730 ... -09272012/
sir, could you please give me basic idea how can i operate upon the controls which are not shown by window spy?? i tried to go through the link https://autohotkey.com/board/topic/7730 ... -09272012/ as provided by you, but as i am novice so i am unable to understand how to use this library in my scenario. moreover, there are no examples etc to learn it. please give me some basic ideas/codes to solve my issue. thank you so much....
I don't normally code as I don't code normally.
Re: How to operate upon the control whose information is not shown by window Spy?
This works on AutoHotkey Help (HTML Help) and Internet Explorer. It works on Internet Explorer_Server controls. You could try it on your program as is, without changing the code.
That Userid box is not a control but a web element. If you search for things like: getElementById, getElementsByClassName, getElementsByTagName, you should find more information.
That Userid box is not a control but a web element. If you search for things like: getElementById, getElementsByClassName, getElementsByTagName, you should find more information.
Code: Select all
;[WBGet function]
;Basic Webpage Controls with JavaScript / COM - Tutorial - Tutorials - AutoHotkey Community
;https://autohotkey.com/board/topic/47052-basic-webpage-controls-with-javascript-com-tutorial/
q::
WinGet, hWnd, ID, A
oWB := WBGet("ahk_id " hWnd)
MsgBox, % oWB.document.activeElement.innerText
MsgBox, % oWB.document.activeElement.outerHTML
MsgBox, % "id: " oWB.document.activeElement.id "`r`n" "class: " oWB.document.activeElement.className "`r`n" "tag: " oWB.document.activeElement.tagName
oWB := ""
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
- Sabestian Caine
- Posts: 528
- Joined: 12 Apr 2015, 03:53
Re: How to operate upon the control whose information is not shown by window Spy?
Thank you so much dear jeeswg for your kind help and support........jeeswg wrote:This works on AutoHotkey Help (HTML Help) and Internet Explorer. It works on Internet Explorer_Server controls. You could try it on your program as is, without changing the code.
That Userid box is not a control but a web element. If you search for things like: getElementById, getElementsByClassName, getElementsByTagName, you should find more information.Code: Select all
;[WBGet function] ;Basic Webpage Controls with JavaScript / COM - Tutorial - Tutorials - AutoHotkey Community ;https://autohotkey.com/board/topic/47052-basic-webpage-controls-with-javascript-com-tutorial/ q:: WinGet, hWnd, ID, A oWB := WBGet("ahk_id " hWnd) MsgBox, % oWB.document.activeElement.innerText MsgBox, % oWB.document.activeElement.outerHTML MsgBox, % "id: " oWB.document.activeElement.id "`r`n" "class: " oWB.document.activeElement.className "`r`n" "tag: " oWB.document.activeElement.tagName oWB := "" return
sir, when i tried to run the codes provided by you then it shows the error msgbox- Error: Call to nonexistent function. And it points to this line- oWB := WBGet("ahk_id " hWnd)
Please please tell me what are we missing in the codes? looking forward for your guidance.... Thanks you very much.....
I don't normally code as I don't code normally.
Re: How to operate upon the control whose information is not shown by window Spy?
It needs the WBGet function, I put a link at the top of the script.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
- Sabestian Caine
- Posts: 528
- Joined: 12 Apr 2015, 03:53
Re: How to operate upon the control whose information is not shown by window Spy?
thank you so much dear jeeswg......jeeswg wrote:It needs the WBGet function, I put a link at the top of the script.
Your really solved my problem.....
I am highly obliged to you.....
Sir i have one small question-
suppose i have 3 tabs in internet explorer and i want to activate specific tab when i press f1 key then what should i do?
for example in first tab there is web page- www.autohotkey.com
in second tab the web page is www.google.com
and the third web page is www.yahoo.com
suppose currently third tab is activated and web page www.yahoo.com is on the screen now i want that when i press f1 key then it should select first tab (which is www.autohotkey.com) automatically.
I mean to say whether second or third tab is activated but when i press f1 key then it should activate first tab.
I know there is built in shortcut key for switching tabs for IE which is ctrl+tab.....
but i want to do it by objects in ahk....
I found the link https://autohotkey.com/board/topic/5268 ... owser-tab/ to be helpful for this purpose but the codes provided by jethrow are not working as i want.....
please help me.....
thanks a lot.....
I don't normally code as I don't code normally.
Re: How to operate upon the control whose information is not shown by window Spy?
There are Ctrl+1 to Ctrl+8 to focus the nth tab, and Ctrl+9 to focus the last tab.
Code: Select all
F1::
F2::
F3::
F4::
F5::
F6::
F7::
F8::
SendInput, % "^" SubStr(A_ThisHotkey, StrLen(A_ThisHotkey))
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
- Sabestian Caine
- Posts: 528
- Joined: 12 Apr 2015, 03:53
Re: How to operate upon the control whose information is not shown by window Spy?
You are really superb dear jeeswg….jeeswg wrote:There are Ctrl+1 to Ctrl+8 to focus the nth tab, and Ctrl+9 to focus the last tab.Code: Select all
F1:: F2:: F3:: F4:: F5:: F6:: F7:: F8:: SendInput, % "^" SubStr(A_ThisHotkey, StrLen(A_ThisHotkey)) return
I really do not know that there is also a built in shortcut key- ctrl + 1 to 9 to select desired tab in internet explorer.
I appreciate your knowledge and skills…..
Sir, as I want to select the specific tab of internet explorer is that, to select it by the name of web site’s url. For example I use com object module for working in MS excel. Suppose I want to select sheet3 when I press f1 key then I use following codes-
f1::
xl:= ComObjActive("Excel.Application")
xl.sheets(“sheet3”).select
return
In the above codes you can see that I am selecting specific sheet (sheet3) by sheet’s name. My quarry is that- can’t this happen in Internet Explorer while selecting specific tab? In my earlier post I gave an example that- suppose there are three tabs in Internet Explorer window and they are- first- www.autohotkey.com, second- www.google.com, third- www.yahoo.com , now I want that whether second for third tab is activated but when I press f1 key then it should activate first tab. I tried to get help from this link as suggested by you- https://autohotkey.com/board/topic/4705 ... -tutorial/
in this link jethrow has done outstanding work to make us understand the basics of controlling webpages. He also provides the codes to ‘Access an IE object by Window/Tab Name:’ and the codes are these-
Code: Select all
IEGet(name="") {
IfEqual, Name,, WinGetTitle, Name, ahk_class IEFrame ;// Get active window if no parameter
Name := (Name="New Tab - Windows Internet Explorer")? "about:Tabs":RegExReplace(Name, " - (Windows|Microsoft)? ?Internet Explorer$")
for wb in ComObjCreate("Shell.Application").Windows()
if wb.LocationName=Name and InStr(wb.FullName, "iexplore.exe")
return wb
}
Thanks..
I don't normally code as I don't code normally.
- Sabestian Caine
- Posts: 528
- Joined: 12 Apr 2015, 03:53
Re: How to operate upon the control whose information is not shown by window Spy?
sir please help....jeeswg wrote:There are Ctrl+1 to Ctrl+8 to focus the nth tab, and Ctrl+9 to focus the last tab.Code: Select all
F1:: F2:: F3:: F4:: F5:: F6:: F7:: F8:: SendInput, % "^" SubStr(A_ThisHotkey, StrLen(A_ThisHotkey)) return
I don't normally code as I don't code normally.
Re: How to operate upon the control whose information is not shown by window Spy?
See JEE_IntExpFocusVisTabByName, where you specify the webpage title and url to focus the tab.
Internet Explorer: activate tab - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 27#p173827
Internet Explorer: activate tab - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 27#p173827
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
- Sabestian Caine
- Posts: 528
- Joined: 12 Apr 2015, 03:53
Re: How to operate upon the control whose information is not shown by window Spy?
Thank you so much dear jeeswg.....jeeswg wrote:See JEE_IntExpFocusVisTabByName, where you specify the webpage title and url to focus the tab.
Internet Explorer: activate tab - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 27#p173827
you really helped me.....
so nice of your....
thanks a lott.....
I don't normally code as I don't code normally.
- Sabestian Caine
- Posts: 528
- Joined: 12 Apr 2015, 03:53
Re: How to operate upon the control whose information is not shown by window Spy?
Hello dear jeeswg...jeeswg wrote: ↑28 Sep 2017, 04:34This works on AutoHotkey Help (HTML Help) and Internet Explorer. It works on Internet Explorer_Server controls. You could try it on your program as is, without changing the code.
That Userid box is not a control but a web element. If you search for things like: getElementById, getElementsByClassName, getElementsByTagName, you should find more information.Code: Select all
;[WBGet function] ;Basic Webpage Controls with JavaScript / COM - Tutorial - Tutorials - AutoHotkey Community ;https://autohotkey.com/board/topic/47052-basic-webpage-controls-with-javascript-com-tutorial/ q:: WinGet, hWnd, ID, A oWB := WBGet("ahk_id " hWnd) MsgBox, % oWB.document.activeElement.innerText MsgBox, % oWB.document.activeElement.outerHTML MsgBox, % "id: " oWB.document.activeElement.id "`r`n" "class: " oWB.document.activeElement.className "`r`n" "tag: " oWB.document.activeElement.tagName oWB := "" return
Sir, I have windows 10 and I am trying to automate Internet explorer using WBGet function, but it is not working on the active internet explorer window....Sir please tell me how can I set values and retrieve values from internet explorer in windows 10? please look at this link-
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=112611&p=501441#p501441
please help me sir...
thanks a lot..
I don't normally code as I don't code normally.
Who is online
Users browsing this forum: arrondark, Bing [Bot], CoffeeChaton and 147 guests