I`m writing a code and I`m stuck with this step>
almost at the end of the code I need AHK to find out if a checkbox is checked on the window. If it is checked, then just need it to proceed with the rest of the code. If it is not checked - I need AHK to check it and then proceed with the rest of the code.
• Is there a way for AHK to find out if one of the checkboxes (or both) is/are checked when it (the checkbox) appears on a window (in a program, that runs on Chrome)?
for example, I run a command and AHK eventually gets to see a window where 2 checkboxes are lined up vertically in a single column:
[v] - this is the checkbox that I need to be checked(if not already checked). When it is checked, the one below becomes checked automatically and that`s good.
If yes, should I first get the X, Y coordinates of the checkbox? Lets say I do, then what?
Get help with using AutoHotkey and its commands and hotkeys
3 posts • Page 1 of 1
If you don't want java, Acc is alternative. Here is en example how to check Ahk Login check-boxes:
P.s.: To get the acc Path (184.108.40.206...) you need Acc Viewer RP3.5.ahk
Code: Select all
#Include Acc.ahk ; https://github.com/sancarn/ACC.AHK ;code assumes chrmoe has opend: https://www.autohotkey.com/boards/ucp.php?mode=login WinActivate ahk_exe chrome.exe WinWaitActive ahk_exe chrome.exe hWnd:= WinExist("ahk_exe chrome.exe") Acc := Acc_Get("Object", "220.127.116.11.18.104.22.168.22.214.171.124.1.1", 0, "ahk_id " hwnd) ; \/ (check Remember...) if (acc.accDefaultAction(0) = "check") Acc.accDoDefaultAction(0) Acc := Acc_Get("Object", "126.96.36.199.188.8.131.52.184.108.40.206.2.1", 0, "ahk_id " hwnd) ; \/ (check Hide...) if (acc.accDefaultAction(0) = "check") Acc.accDoDefaultAction(0) Acc:= "" ExitApp
Last edited by rommmcek on 10 Apr 2021, 09:26, edited 1 time in total.
thanks, will look into it!