This routine fixes it. I needed a range of numbers from 1-10,000. A bit cumbersome, but it appears bullet proof.
on setEmptyTrash_(sender)
set trashEmptyNumber to trashEmptyNumber as integer
set trashIncrement to trashIncrement as integer
if trashEmptyNumber = 1 then
if trashIncrement = 100 then
set my trashEmptyNumber to 90
set trashIncrement to 10
trashStepper's setIncrement_(trashIncrement)
end if
end if
if (my trashEmptyNumber ≤ 10 and my trashEmptyNumber ≠ 1 and trashIncrement = 10) then
set trashIncrement to 1
trashStepper's setIncrement_(trashIncrement)
end if
if (my trashEmptyNumber = 1 and trashIncrement = 10) then
set my trashEmptyNumber to 9
set trashIncrement to 1
trashStepper's setIncrement_(trashIncrement)
else
if (my trashEmptyNumber ≤ 99 and my trashEmptyNumber > 9 and trashIncrement ≥ 10) or (my trashEmptyNumber ≤ 99 and my trashEmptyNumber > 9 and trashIncrement = 1) then
set trashIncrement to 10
trashStepper's setIncrement_(trashIncrement)
else
if (my trashEmptyNumber ≥ 100 and trashIncrement = 10) then
set trashIncrement to 100
trashStepper's setIncrement_(trashIncrement)
else
if (my trashEmptyNumber ≤ 99 and trashIncrement = 100 ) then
set trashIncrement to 10
trashStepper's setIncrement_(trashIncrement)
end if
end if
end if
end if
my saveThePrefs()
end setEmptyTrash_
On 21/03/2013, at 5:47 PM, Shane Stanley <
email@hidden> wrote:
On 21/03/2013, at 5:33 PM, Brian Christmas <
email@hidden> wrote:
In Applescript ObjC is there any way to tell if the top or bottom of a stepper is being clicked on?
Not easily.
I'm trying to get a stepper to act as tho it's partly logarithmic in it's response.
You're trying to make something behave differently from how it was designed, and that's usually (a) difficult, and (b) not a good idea.
What is the stepper doing?
Have you considered using a modifier key? Something like holding shift multiplies x10 and option-shift x100.