Skip to content

Noah jaffe/randomized input delay - #149

Draft
Noah-Jaffe wants to merge 16 commits into
LOUDO56:mainfrom
Noah-Jaffe:noah-jaffe/randomized_input_delay
Draft

Noah-Jaffe wants to merge 16 commits into
LOUDO56:mainfrom
Noah-Jaffe:noah-jaffe/randomized_input_delay

Conversation

@Noah-Jaffe

@Noah-Jaffe Noah-Jaffe commented Sep 12, 2026

Copy link
Copy Markdown

Current status:

new bugs found, not ready for review.

In this PR:

  • better error handling for settings inputs (main_app.valudate_cmd)
  • added language support for new randomized delay, also fixed whitespace inconsistency (src/lang/...)
  • auto resize settings popups for the contents it is attempting to display (src/window)
  • allow zero time delay from spinbox button inputs to match the existing requirements (delay.py)
  • add supporting framework for randomized delay (imports, exports, defaults, lang strings)
  • implementation for randomized delay between actions with a custom distribution selection for randomized values (randomized_delay, distribution_drawer)

@Noah-Jaffe

Copy link
Copy Markdown
Author

can someone review this please? the changes to the translations was AI supported and hand checked for consistency, but everything else is human

@Noah-Jaffe Noah-Jaffe left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some extra guidance for the reviewer, + change requests for me to do.

Comment thread src/macro/macro.py Outdated
Comment thread src/macro/macro.py Outdated
Comment thread src/utils/user_settings.py
Comment thread src/utils/user_settings.py
self.icon.run()

def validate_input(self, action, value_if_allowed):
def validate_input_float(self, action, value_if_allowed):

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Distribution settings allow for negative values, so float("-") would end up erroring and returning false. This may require the edge case be added for allowing just "-"? If just "-" is supplied, convert to zero.

Comment thread src/windows/options/playback/randomized_delay.py Outdated
Button(button_area, text=main_app.text_content["global"]["confirm_button"], command=lambda: self.setNewValues(self.lowerInput.get(), self.upperInput.get(), main_app)).pack(side=LEFT, padx=10)
Button(button_area, text=main_app.text_content["global"]["cancel_button"], command=self.destroy).pack(side=LEFT, padx=10)
button_area.pack(side=BOTTOM, pady=10)
self.update_idletasks()

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Popup resize logic.

self.canvas.bind("<ButtonRelease-1>", self.finish_drawing)
# Draw the existing distribution, if one exists.
self.load_distribution(distribution)
self.update_idletasks()

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Popup resize logic.

Comment thread src/windows/options/playback/randomized_delay.py Outdated
Comment thread src/windows/options/playback/randomized_delay.py Outdated
settingFile_json = load(settingFile)
return settingFile_json

def update_settings(self):

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code quality checks flag this function as too complex, we can probably change this to do a nested merge with existing settings and the default settings file.

@Noah-Jaffe Noah-Jaffe left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made changes from self review

@Noah-Jaffe

Copy link
Copy Markdown
Author
random distribution occurance of random choice

@Noah-Jaffe

Noah-Jaffe commented Sep 14, 2026

Copy link
Copy Markdown
Author

Hmm I think i might be missing language support for some of the distribution window. I should probably fix that
also other macro recording issues might have been brought about by these changes somehow. will prob fix next weekend.

@Noah-Jaffe
Noah-Jaffe marked this pull request as draft September 15, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant