AutoClicker icon indicating copy to clipboard operation
AutoClicker copied to clipboard

Add Random Interval

Open bnn678 opened this issue 2 years ago • 12 comments

Updated the UI to include a new section that allows users to specify a maximum and minimum interval.

image

To use the randomized interval, simply set a value in the maximum and minimum input boxes where the sum of the maximum values is greater than than the minimum values.

NOTE: The randomized interval will only be used if the Click Interval is set to 0. If any value is entered in the Click Interval, the Click Interval will be used instead

Desired Future Updates

  1. ~~Add some indication in the UI that only the Click Interval or Randomized Click Interval can be used (not both). Possibly disable the input box when either has a non-zero value?~~
    This was added using the IsRandomizedIntervalEnabled AutoClickerSetting, an explicit call to OnPropertyChanged, and the IsEnabled property.
  2. Fix the new horizontal spacing issue. I introduced a bug that caused the hortizontal spacing to "squish" a bit. I don't have enough experience with XAML to quickly fix this bug. The most obvious sign of this new bug is that the input boxes no longer have a right border

bnn678 avatar Nov 30 '21 05:11 bnn678

Just discovered a bug. The interval is not reset after the mouse click action in the current implementation. I need to move the interval update logic into the OnClickTimerElapsed function

bnn678 avatar Nov 30 '21 07:11 bnn678

  1. Add some indication in the UI that only the Click Interval or Randomized Click Interval can be used (not both). Possibly disable the input box when either has a non-zero value?

I like this idea. It should possibly be part of this PR because without an indication in the UI, it's a bit more confusing to get expected results from this application.

james-s-w-clark avatar Nov 30 '21 14:11 james-s-w-clark

  1. Add some indication in the UI that only the Click Interval or Randomized Click Interval can be used (not both). Possibly disable the input box when either has a non-zero value?

I like this idea. It should possibly be part of this PR because without an indication in the UI, it's a bit more confusing to get expected results from this application.

I agree. I also think that the horizontal spacing issue should be fixed before this PR is merged. Unforunately I have no experience with XAML so I htink someone else would be better equiped to add these features

bnn678 avatar Nov 30 '21 16:11 bnn678

@bnn678 First of all, thanks for taking the time of making a PR and putting effort into this, it's really appreciated. 🙏🏽 @IdiosApps I also appreciate the thought put into your review.

I was considering adding a separate flag to enable/disable random intervals. I agree. Maybe go with the same concept as switching between the "Click Repeat" methods or the "Click Position" methods. This might require a workaround to include a RadioButton inside a GroupBox's header, but we'll figure it out.

Regarding all other things discussed, take your time. That's why drafts are for :) I will try to pitch in the next few days when I have time off work, to leave review notes and see what can I do to help.

oriash93 avatar Dec 01 '21 23:12 oriash93

May I suggest a simpler implementation? Use the Click Interval fields as the minimum, and rather than specifying the maximum the user specifies the random range. Leave the original Click Interval section alone and add a single set of Random Interval fields. When these are non-zero, a random value between 0 and the Random Interval total is added to the Click Interval.

KronkIV avatar Dec 11 '21 03:12 KronkIV

@KronkIV I considered using the existing Click Interval as a portion of the input, but I ultimately decided against because it is more ambiguous. Without additional UI information, it's not inherently obvious to a user what each of the components would be for. I believe that the current UI implementation makes it instantly obvious how the Randomized Click Interval should be used.

@oriash93 Thanks! I plan to update this PR over the time I have off around Christmas.

bnn678 avatar Dec 13 '21 14:12 bnn678

@IdiosApps @oriash93 I have attempted to disable the inputs at an appropriate time, but unforunately I can't figure out why the disabled state of the input won't update after the program is stared. Does anyone have suggestions?

bnn678 avatar Dec 16 '21 03:12 bnn678

@bnn678 Are you still working on this?

oriash93 avatar Feb 17 '22 08:02 oriash93

Here is what the interface looks like when the Click Interval is set to 0

image

And here is the appearance when there is a non-zero Click Interval

image

In the current implementation, the IsEnabled property is used instead of the IsReadOnly property because the "grey-out" effect makes it more obvious to users that the randomized interval is disregarded if a standard interval is provided.

bnn678 avatar Feb 22 '22 02:02 bnn678

Probably should have checked existing PRs as I just opened one for this. My only gripe is that a real human clicking so fast, produces something closer to a normal distribution, rather than a uniformly distributed random range.

If I was reviewing someone's click action/statistics and saw a perfectly uniform random distribution for some duration of time that is neatly windowed, it'd be a huge red flag. A lot of human action/response times tend to be closer to normal, skewed, and multimodal distributions.

Also curious, have you noticed whether the new logic adds considerable delays, possibly requiring compensation, to achieve same CPS w/o the added logic?

TriforceSeeker avatar Mar 17 '23 07:03 TriforceSeeker

human action/response times tend to be closer to normal, skewed, and multimodal distributions

Thats a very intereting point and something I hadn't considered.

have you noticed whether the new logic adds considerable delays,

I haven't noticed any delays, but I also ddn't do any actual performance testing. I can make no guarenteed promises, but it appears to perform reasonably.

bnn678 avatar Mar 17 '23 13:03 bnn678

Great work!

boazfionic avatar Mar 25 '24 15:03 boazfionic