Hi,
Can anyone help me to click on this button in MS Dynamics AX?
Control is not working, yet Acc doesnt have path.
Ok, I can do it with "FindText - Capture screen image" and click, but I want that click to be inside of app? Something like COM in Internet Explorer.
Thnx
WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
- Attachments
-
- Capture.PNG
- (11.79 KiB) Downloaded 124 times
Re: WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
interesting. what is this? i never saw it?
Last edited by SL5 on 04 Oct 2018, 05:28, edited 1 time in total.
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
Location of Acc is x370 y86 w127 h22
Other data can be seen from the picture.
If that is helpful?
Other data can be seen from the picture.
If that is helpful?
Re: WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
Why not get a handle from it? Use it like a normal Win32 Control! Like a control named Edit3.
Hope my code is right and you know what I mean?
Code: Select all
ControlGet, Chwnd, hwnd,, WindowsForms10.Window.8.app.0.34f5582_r41_ad1141, A
Re: WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
Perhaps consider this, if the control's class changes each time.
Being more generic when using WinActivate and ControlSetText - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 24#p186624
Being more generic when using WinActivate and ControlSetText - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 24#p186624
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: WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
I've often have to deal with WindowsForms controls. Changing of the classNN name i've never seen, but I've never programmed a WindowsForms App. So it's unknown for me. Try jeeswg's suggestion if mine won't work over the time.
Re: WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
Hi Frosti and jeeswg,
Thank you on you effort.
Frosti, I am getting hwnd (like one my first picture), but how to click based on hwnd?
jeeswg can you help me transfer me your code into my request, because ultimate goal is to click on a button.
Thank you
Thank you on you effort.
Frosti, I am getting hwnd (like one my first picture), but how to click based on hwnd?
jeeswg can you help me transfer me your code into my request, because ultimate goal is to click on a button.
Thank you
Re: WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
- My script will only work if there is a control, which the AHK window spy would report.
- Otherwise see JEE_AccGetTextAll, mentioned here:
jeeswg's Acc tutorial (Microsoft Active Accessibility) (MSAA) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=40590
- Otherwise see JEE_AccGetTextAll, mentioned here:
jeeswg's Acc tutorial (Microsoft Active Accessibility) (MSAA) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=40590
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: WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
Oh sorry I leave you with a half solution. There a multiple possible ways. The safest way is to use the ControlClick command. You can use your handle or use only the classNN here.
There are much options left for this command in my description. For default it's send a left mouseclick.
Or you can use with coordinates or you can send a message via .
I prefer ControlClick or Send/Postmessage because they set. With checking that you can control the success of your input.
Code: Select all
;ControlClick , Control-or-Pos, WinTitle, WinText, WhichButton, ClickCount, Options, ExcludeTitle, ExcludeText
;1.
ControlClick,, ahk_id %Chwnd%
2.
ControlClick, WindowsForms10.Window.8.app.0.34f5582_r41_ad1141, A
Or you can use
Code: Select all
Mouseclick
Code: Select all
SendMessage ; or
Postmessage
I prefer ControlClick or Send/Postmessage because they set
Code: Select all
ErrorLevel
Re: WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
Thank you both of you.
This should work and it does in so many times, but in this case is not working.
Probably is something in app code, so I will use "FindText - Capture screen image" to resolve this situation.
This should work and it does in so many times, but in this case is not working.
Code: Select all
ControlClick, WindowsForms10.Window.8.app.0.34f5582_r41_ad1141, ahk_class AxMainFrame
Re: WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
for me in a similar case (toggle a checkbox in a WindowsForms) it's working like this:
Code: Select all
F7:: ; each press should toggle the checkbox
WinFormTitle := "ahk_class AxMainFrame" ; <- insert the right title here
WinFormCtrl := "WindowsForms10.Window.8.app.0.34f5582_r41_ad1141" ; <- insert the right control here
ControlFocus, % WinFormCtrl, % WinFormTitle
Send {Space}
return
Who is online
Users browsing this forum: mapcarter and 333 guests