Enable radio button after edit variable changes

Get help with using AutoHotkey and its commands and hotkeys
mshall
Posts: 4
Joined: 13 Jul 2018, 16:42

Enable radio button after edit variable changes

13 Jul 2018, 16:58

Hello,

I am trying to set up a radio button that is disabled until the user types something in the edit field. Even a timer would be acceptable in this case.

Current code:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



The Submit button is set up just to change pages and act upon those file paths. As you can see I got Submit to disable and reenable (I think it just drew over it), but I can't figure the same for that radio button.
User avatar
TLM
Posts: 1315
Joined: 01 Oct 2013, 07:52

Re: Enable radio button after edit variable changes

13 Jul 2018, 19:37

try

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

also the option verb for gui controls is disabled ;)
mshall
Posts: 4
Joined: 13 Jul 2018, 16:42

Re: Enable radio button after edit variable changes

Today, 09:07

I tried the EnableRadio change, and that somehow broke my check function so I could no longer submit. I tried moving it before "Check" and when I select the radio button it exits the app. I played with submit a little bit, but it didn't seem to change. I then added an extra return to Check in case that was causing the failure. The GUI stopped exiting, but checking the radio button no longer writes to my setup.ini file (listed in Check).

My current code (including some stuff I didn't show before):

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

User avatar
TLM
Posts: 1315
Joined: 01 Oct 2013, 07:52

Re: Enable radio button after edit variable changes

12 minutes ago

Based on your original code with the EnableRadio label additon,
the variable RadioGroup returns 1 when the `Default` radio button is checked,
and 0 when the `Custom` radio button is checked.

To make both radio buttons write to the ini file, you will have to change the condition:
from if (RadioGroup = 1) to if ( RadioGroup = 1 || RadioGroup = 0 )
Or if you only want the `Custom` radio button to write the ini: if (RadioGroup = 0)


( not tested against your updated code ) htms..

Return to “Ask For Help”

Who is online

Users browsing this forum: Flipeador, jamesrize and 55 guests