In e-prime, how to move fast the value of slide slider by keyboard pressing?

153 views
Skip to first unread message

Huiyeong

unread,
Nov 28, 2023, 9:40:12 PM11/28/23
to E-Prime
Hello, I am Huiyeong.
I am trying to use the 'slide slider' function for evaluating felt threateness in units of 1 from 0 to 100 in e-prime. I could set the slide slider to be moved one by one press of the left or right arrow of the keyboard.

So it takes too long to move end(value=0) to end(value=100).
Therefore, I want to modify the values of the slide slider fast by longpress of the left arrow or right arrow on the keyboard.
But I could not find that function. So my question is below.

1) Is there a functioning long press move by keyboard in the slide slider?
2) If there is, how can I set it?

McFarlane, David

unread,
Dec 5, 2023, 3:59:11 PM12/5/23
to e-p...@googlegroups.com
Huiyeong,

Interesting puzzle. The prototype for this is the "Control SlideSlider with Keyboard Task Event" example at the PST website, support.pstnet.com/hc/en-us/articles/360061856354-Control-SlideSlider-with-Keyboard-Task-Event-37241- This gets its input through the E-Prime Device mechanism, and as far as I know this mechanism ignores keyboard auto-repeat. It does however separately recognize keyboard presses and releases. Also, Task Events includes a Slider.ValueChanged event. I tried my hand at using some combination of Keyboard.Press, Keyboard.Release, and Stimulus.Slider1.ValueChanged task events to make an example for you, but this got complicated.

As a workaround, you could assign alternative keys (e.g., Page Up, Page Down) to use for larger jumps.

Finally, you might submit this to PST Support and see what they say. And if you learn anything useful there then please report back here.

-- David McFarlane

Huiyeong

unread,
Dec 6, 2023, 4:07:19 AM12/6/23
to E-Prime
Hello, David.

Thak you for reply. I send this message right before but I think it is not in this group. So I upload again.
I uploaded the question in the request tab on PST.

But I thought your jumping idea is also good. SlideSlider is moving on left and right arrow so I thought that upper and down arrow is good for alternative keys to move larger unit(like 10).
I tried label function for alternative keys but it made the value of slideslider move first state of slideslider(attatchment below).
So could you tell me how to assign alternative keys on jumping values in slideslider..?


Huiyeong Kim.

2023년 12월 6일 수요일 오전 5시 59분 11초 UTC+9에 McFarlane, David님이 작성:
Control SlideSlider With Keyboard via TaskEvent (1).es3

McFarlane, David

unread,
Dec 7, 2023, 2:19:35 PM12/7/23
to e-p...@googlegroups.com
Huiyeong ,

Down and Up arrows do make good choices for alternative keys to use for larger steps.

I implemented this simply by modifying the global User Script in the "Control SlideSlider With Keyboard via TaskEvent" example from PST:

Sub MoveTheIndicator (c As Context, theKeyValue As String)
Const LargeStep As Integer = 10
Dim slSlider As SlideSlider
Set slSlider = CSlideSlider(Stimulus.ActiveObjects("Slider1"))
Select Case theKeyValue
Case "{LEFTARROW}"
If (slSlider.Value > slSlider.ValueMin) Then _
slSlider.Value = slSlider.Value - 1
Case "{RIGHTARROW}"
If (slSlider.Value < slSlider.ValueMax) Then _
slSlider.Value = slSlider.Value + 1
Case "{DOWNARROW}"
slSlider.Value = slSlider.Value - LargeStep
If (slSlider.Value < slSlider.ValueMin) Then _
slSlider.Value = slSlider.ValueMin
Case "{UPARROW}"
slSlider.Value = slSlider.Value + LargeStep
If (slSlider.Value > slSlider.ValueMax) Then _
slSlider.Value = slSlider.ValueMax
Case Else
' Do nothing
End Select
End Sub

You can see that this now handles the Down Arrow and Up Arrow cases.

While I was at it I made a few other changes to suit my style. Mostly, I used slSlide as an intermediate "convenience" variable to make everything more readable, and I used a Select-Case structure in place of the compound conditional statements. You should modify this to suit your own tastes.

-- David McFarlane


On 2023-12-06 Wed 4:07 AM, Huiyeong wrote:
> Hello, David.
>
> Thak you for reply. I send this message right before but I think it is not in this group. So I upload again.
> I uploaded the question in the request tab on PST.
>
> But I thought your jumping idea is also good. SlideSlider is moving on left and right arrow so I thought that upper and down arrow is good for alternative keys to move larger unit(like 10).
> I tried label function for alternative keys but it made the value of slideslider move first state of slideslider(attatchment below).
> So could you tell me how to assign alternative keys on jumping values in slideslider..?
>
>
> Huiyeong Kim.
>
> 2023년 12월 6일 수요일 오전 5시 59분 11초 UTC+9에 McFarlane, David님이 작성:
>
> Huiyeong,
>
> Interesting puzzle. The prototype for this is the "Control SlideSlider with Keyboard Task Event" example at the PST website, support.pstnet.com/hc/en-us/articles/360061856354-Control-SlideSlider-with-Keyboard-Task-Event-37241- <https://urldefense.com/v3/__http://support.pstnet.com/hc/en-us/articles/360061856354-Control-SlideSlider-with-Keyboard-Task-Event-37241-__;!!HXCxUKc!yVh6M3Y-1c9jjzUsjpWNmXZLOyvwHidnpQ8ELWRiaEaR-0an_u3K8Zv42HiKvzk5VWn446ICdrDylnU$> This gets its input through the E-Prime Device mechanism, and as far as I know this mechanism ignores keyboard auto-repeat. It does however separately recognize keyboard presses and releases. Also, Task Events includes a Slider.ValueChanged event. I tried my hand at using some combination of Keyboard.Press, Keyboard.Release, and Stimulus.Slider1.ValueChanged task events to make an example for you, but this got complicated.

Huiyeong

unread,
Dec 9, 2023, 3:27:22 AM12/9/23
to E-Prime
Hello, David.

I really appreciate for additional support.
Now I can now move the slider values in larger increments.
And just in case you were curious, I let you know. I received an answer to my question from PST support.
They told me to look at E-STUDIO: Using Task Events [22862] and read the Inline called ReadMe in attached file 'MoveSliderWithTaskEvent - HoldArrows.es3'.
Thank you so much for your kind help, have a nice day!


Huiyeong Kim.

2023년 12월 8일 금요일 오전 4시 19분 35초 UTC+9에 McFarlane, David님이 작성:

McFarlane, David

unread,
Dec 11, 2023, 4:36:47 PM12/11/23
to e-p...@googlegroups.com
Huiyeong,

Thank you for reporting back with results from PST Support. Good to see a full solution for this!

-- David McFarlane
> > Interesting puzzle. The prototype for this is the "Control SlideSlider with Keyboard Task Event" example at the PST website, support.pstnet.com/hc/en-us/articles/360061856354-Control-SlideSlider-with-Keyboard-Task-Event-37241- <https://urldefense.com/v3/__http://support.pstnet.com/hc/en-us/articles/360061856354-Control-SlideSlider-with-Keyboard-Task-Event-37241-__;!!HXCxUKc!yInT-8_1a-xGKXnjAW1TJhb6bwJel2xo3UOysGRQeTtCTdBqQ3S87TpgZiEIdDGNn9YCuN1pJ68f32c$> <https://urldefense.com/v3/__http://support.pstnet.com/hc/en-us/articles/360061856354-Control-SlideSlider-with-Keyboard-Task-Event-37241-__;!!HXCxUKc!yVh6M3Y-1c9jjzUsjpWNmXZLOyvwHidnpQ8ELWRiaEaR-0an_u3K8Zv42HiKvzk5VWn446ICdrDylnU$ <https://urldefense.com/v3/__http://support.pstnet.com/hc/en-us/articles/360061856354-Control-SlideSlider-with-Keyboard-Task-Event-37241-__;!!HXCxUKc!yVh6M3Y-1c9jjzUsjpWNmXZLOyvwHidnpQ8ELWRiaEaR-0an_u3K8Zv42HiKvzk5VWn446ICdrDylnU$>> This gets its input through the E-Prime Device mechanism,
> and as far as I know this mechanism ignores keyboard auto-repeat. It does however separately recognize keyboard presses and releases. Also, Task Events includes a Slider.ValueChanged event. I tried my hand at using some combination of Keyboard.Press, Keyboard.Release, and Stimulus.Slider1.ValueChanged task events to make an example for you, but this got complicated.
> >
> > As a workaround, you could assign alternative keys (e.g., Page Up, Page Down) to use for larger jumps.
> >
> > Finally, you might submit this to PST Support and see what they say. And if you learn anything useful there then please report back here.
> >
> > -- David McFarlane
> >
> >
> > On 2023-11-28 Tue 9:40 PM, Huiyeong wrote:
> > > Hello, I am Huiyeong.
> > > I am trying to use the 'slide slider' function for evaluating felt threateness in units of 1 from 0 to 100 in e-prime. I could set the slide slider to be moved one by one press of the left or right arrow of the keyboard.
> > >
> > > So it takes too long to move end(value=0) to end(value=100).
> > > Therefore, I want to modify the values of the slide slider fast by longpress of the left arrow or right arrow on the keyboard.
> > > But I could not find that function. So my question is below.
> > >
> > > 1) Is there a functioning long press move by keyboard in the slide slider?
> > > 2) If there is, how can I set it?
>
> --
> You received this message because you are subscribed to the Google Groups "E-Prime" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+u...@googlegroups.com <mailto:e-prime+u...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/1f202832-1735-461b-b4b0-a1ee65043105n%40googlegroups.com <https://urldefense.com/v3/__https://groups.google.com/d/msgid/e-prime/1f202832-1735-461b-b4b0-a1ee65043105n*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!HXCxUKc!yInT-8_1a-xGKXnjAW1TJhb6bwJel2xo3UOysGRQeTtCTdBqQ3S87TpgZiEIdDGNn9YCuN1pFXSUJak$>.
Reply all
Reply to author
Forward
0 new messages