Hello,
I need some help with my code.
Am I missing something, because message box is always empty and I did spy stuff with accessible info viewer?
If you ask me for a win title, it is in a variable "hrx", and it is from main window, so this is fine.
Picture of Accesible info viewer is in attachment.
WinActivate, ahk_class AxMainFrame
Sleep, 333
WinGetTitle, hrx, ahk_class AxMainFrame
Sleep, 333
#Include C:\Program Files\AutoHotkey\Lib\Acc.ahk
test := Acc_Get("Value", "4.2.8", 0, "%hrx%")
Sleep, 300
MsgBox, 0, , %test%, 1
Return
active accessibility get value
active accessibility get value
- Attachments
-
- Capture.PNG (12.42 KiB) Viewed 6013 times
Re: active accessibility get value
Your code tries to access the window with the literal name: %hrx%
Use:
Use:
Code: Select all
test := Acc_Get("Value", "4.2.8", 0, hrx)
Re: active accessibility get value
Hi Elgin,
Thanks for your reply, but these two combination does not working.
test := Acc_Get("Value", "4.2.8", 0, hrx)
test := Acc_Get("Value", "4.2.8", 0, %hrx%)
Also the 1st one same situation
test := Acc_Get("Value", "4.2.8", 0, "%hrx%")
Is anything else wrong in my code INCLUDE maybe?
Thanks for your reply, but these two combination does not working.
test := Acc_Get("Value", "4.2.8", 0, hrx)
test := Acc_Get("Value", "4.2.8", 0, %hrx%)
Also the 1st one same situation
test := Acc_Get("Value", "4.2.8", 0, "%hrx%")
Is anything else wrong in my code INCLUDE maybe?
Re: active accessibility get value
Since you're accessing the window through "ahk_class AxMainFrame": does it have a title at all? If not you would pass an empty string through hrx which will do nothing.
Try:
and get rid of the WinGetTitle. The WinActivate should not be needed either.
Try:
Code: Select all
test := Acc_Get("Value", "4.2.8", 0, "ahk_class AxMainFrame")
Re: active accessibility get value
The following may work:
Btw I would expect that Sleep would not be necessary for this script.
This works in Notepad:
Code: Select all
ControlGet, hCtl, Hwnd,, AxPaneWnd4, ahk_class AxMainFrame
test := Acc_Get("Value", "4.2.8", 0, "ahk_id " hCtl)
test2 := Acc_Get("Value", "4.1.4.2.8", 0, "ahk_id " hCtl)
MsgBox, 0,, % test, 1
MsgBox, 0,, % test2, 1
return
This works in Notepad:
Code: Select all
q::
ControlGet, hCtl, Hwnd,, Edit1, ahk_class Notepad
vText := Acc_Get("Value", "4", 0, "ahk_id " hCtl)
MsgBox, % vText
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
Re: active accessibility get value
Wow, this code bellow works, really thanks for your help jeeswg
Also Elgin thank you too.
ControlGet, hCtl, Hwnd,, AxPaneWnd4, ahk_class AxMainFrame
test := Acc_Get("Value", "4.2.8", 0, "ahk_id " hCtl)
MsgBox, 0,, % test, 1
return
Also Elgin thank you too.
ControlGet, hCtl, Hwnd,, AxPaneWnd4, ahk_class AxMainFrame
test := Acc_Get("Value", "4.2.8", 0, "ahk_id " hCtl)
MsgBox, 0,, % test, 1
return
Re: active accessibility get value
Hi all,
I need help with this code, can someone knows what is wrong with my code?
Always I get blank message after run, Name is not working.
Is it because of IE?
Am I missing something?
I need help with this code, can someone knows what is wrong with my code?
Always I get blank message after run, Name is not working.
Is it because of IE?
Am I missing something?
Code: Select all
test := ""
WinActivate, ahk_class IEFrame
Sleep, 333
#Include Acc.ahk
ControlGet, hCtl, Hwnd, , Internet Explorer_Server1, ahk_class IEFrame
test := Acc_Get("Name", "14.1.6.23.1", 1, "ahk_id " hCtl)
Sleep, 300
MsgBox, 0, , %test%
Return
- Attachments
-
- Capture.PNG (15.8 KiB) Viewed 5789 times
Re: active accessibility get value
- You might want to use the hWnd of Internet Explorer instead of the control, it depends which window/control you select with the rectangle, before navigating down to the element.
- I would generally recommend using COM for Internet Explorer.
- This might help you to identify the right Acc path:
Acc: get text from all window/control elements - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=40615
- I would generally recommend using COM for Internet Explorer.
- This might help you to identify the right Acc path:
Acc: get text from all window/control elements - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=40615
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
Re: active accessibility get value
Hi jeeswg,
What is the hWnd of IE?
Yes, normally I am using COM, but these fields are inside IE like IFRAME.1, so my thoughts are to use Acc to get Values/Names of these fields.
Can you help me with that? What is best choice?
What is the hWnd of IE?
Yes, normally I am using COM, but these fields are inside IE like IFRAME.1, so my thoughts are to use Acc to get Values/Names of these fields.
Can you help me with that? What is best choice?
Re: active accessibility get value
- To get the hWnd of Internet Explorer:
WinGet, hWnd, ID, ahk_class IEFrame
- An IFrame example:
IE iframe and frame - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 78#p128078
- Further IFrame links:
COM+IE error "0x80070005 - Access is denied." with PayPal - Ask for Help - AutoHotkey Community
https://autohotkey.com/board/topic/9144 ... ntry668548
Need COM help for IE - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 189#p28189
WinGet, hWnd, ID, ahk_class IEFrame
- An IFrame example:
IE iframe and frame - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 78#p128078
- Further IFrame links:
COM+IE error "0x80070005 - Access is denied." with PayPal - Ask for Help - AutoHotkey Community
https://autohotkey.com/board/topic/9144 ... ntry668548
Need COM help for IE - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 189#p28189
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
Re: active accessibility get value
Hi,
Finally I did it.
After more houndrets tries correct path is 1.14.1.6.23.1, but in Acc Viewer you can see up in this post given path is 14.1.6.23.1.
So I was missing "1." in front of the code.
Is something wrong with Acc Viewer or I am not using it correctly?
Correct code is:
Finally I did it.
After more houndrets tries correct path is 1.14.1.6.23.1, but in Acc Viewer you can see up in this post given path is 14.1.6.23.1.
So I was missing "1." in front of the code.
Is something wrong with Acc Viewer or I am not using it correctly?
Correct code is:
Code: Select all
test := Acc_Get("Name", "1.14.1.6.23.1", 1, "ahk_id " hCtl)
Re: active accessibility get value
- It can be difficult to get AccViewer to show the correct numbers in full, that was a key reason for the function I created, posted here:
Acc: get text from all window/control elements - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=40615
- Even though it looks like you've been successful, I would recommend that you try the function in that link, and also try my script that uses WBGet above, in case that works.
Acc: get text from all window/control elements - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=40615
- Even though it looks like you've been successful, I would recommend that you try the function in that link, and also try my script that uses WBGet above, in case that works.
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
Re: active accessibility get value
Haven't used AccViewer for a while, but isn't the "1." for the "child id", mentioned in the AccViewer. "Path" is then the path for that child ID...
EDit: Ah, I guess the next parameter in Acc_Get is for the child ID... but does this function work correctly then? I guess I will have to investigate further...
EDit: Ah, I guess the next parameter in Acc_Get is for the child ID... but does this function work correctly then? I guess I will have to investigate further...
Re: active accessibility get value
Hi gregster,
I can help you with something that I know and that is my next thing to investigate.
Situation is similar like above, path is 1.14.1.17.4.1.1 and Child id: 2, but wont find name when you put lets say:
2.1.14.1.17.4.1.1, 2
1.14.1.17.4.1.1, 2
2.14.1.17.4.1.1, 1
2.14.1.17.4.1.1, 2
I am working in Microsoft Dynamics CRM.
I can help you with something that I know and that is my next thing to investigate.
Situation is similar like above, path is 1.14.1.17.4.1.1 and Child id: 2, but wont find name when you put lets say:
2.1.14.1.17.4.1.1, 2
1.14.1.17.4.1.1, 2
2.14.1.17.4.1.1, 1
2.14.1.17.4.1.1, 2
I am working in Microsoft Dynamics CRM.
Re: active accessibility get value
Ok, now it is working I just put 2nd option and thats it.
I mean I tried this over and over.
I hope that tommorow whenn I come again to job it will still be working
I mean I tried this over and over.
I hope that tommorow whenn I come again to job it will still be working
Re: active accessibility get value
After restarting of my computer againg not working???!!!???
Does someone knows what could be problem?
Maybe include or something else?
Does someone knows what could be problem?
Maybe include or something else?
Who is online
Users browsing this forum: Google [Bot], jaka1, marypoppins_1, mikeyww, usser, wilkster and 143 guests