Wednesday, July 17, 2019

#1 2019-07-10 10:50:56 am

SabaGuy
Member
Registered: 2019-07-10
Posts: 2

Click CheckBox doesn't work

I created a simple AppleScript that would click a button, if it was not already clicked, within the application WSJT-X.  The script works to turn the button from clear to red, but it does not activate the button.  More specifically, the script will turn the "Enable TX" button red, but it does not Enable Tx.

A mouse click from the trackpad will turn the "Enable TX" button red and Enable Tx.  (Unfortunately, there is not a drop-down menu choice that will also Enable TX.)

So, there must be a difference in clicking a button from the trackpad and from System Events.

Any ideas?

Here's the script:
=============================================================================
tell application "wsjtx" to activate
tell application "System Events"
    tell process "WSJT-X"
        delay 1
        set theCheckbox to checkbox "Enable TX" of window "WSJT-X   v2.0.1   by K1JT"
        tell theCheckbox
            set checkboxStatus to value of theCheckbox as boolean
            if checkboxStatus is false then click theCheckbox
        end tell
    end tell
end tell
=============================================================================

Here's a WSJT-X window and what its "Enable TX" button looks like:   https://qrznow.com/wsjt-x-version-1-8-0-rc2/

Offline

 

#2 2019-07-10 11:18:41 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 3471

Re: Click CheckBox doesn't work

In such case it may help to use Cliclick available from :
https://www.bluem.net/en/projects/

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) mercredi 10 juillet 2019  19:18:35

Offline

 

#3 2019-07-10 01:52:46 pm

SabaGuy
Member
Registered: 2019-07-10
Posts: 2

Re: Click CheckBox doesn't work

Thanks, Yvan!  cliClick works.

Sometimes, 1 click is better than another. smile


Filed under: cliClick

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)