Author Topic: Scroll middle wheel mouse  (Read 4190 times)

Krapuke

  • Guest
Scroll middle wheel mouse
« on: November 21, 2018, 10:22:58 AM »
Hello
I try to forward and backward the middle wheel mouse in Star citizen when you are mining.
To increase or decrease the laser for mining you have to use forward or backwared the middle wheel.

I try to use:
Scroll mouse wheel forward 10 clicks
and
Scroll mouse wheel backward 10 clicks
But no action I try more with a value of 20, 50 etc. but no action.
An idea to do that?
It should be wonderfull if I can say for exemple:
[Increase power][5..50]

Thanks in advance for answers ....



kourou

  • Jr. Member
  • **
  • Posts: 81
  • Anything that can go wrong will go wrong
    • FANNY (Discord)
Re: Scroll middle wheel mouse
« Reply #1 on: November 21, 2018, 03:29:21 PM »
Make some pauses between wheels :

Scroll mouse wheel forward 1 clicks
Pause 0.2 seconds
Scroll mouse wheel forward 1 clicks
Pause 0.2 seconds
Scroll mouse wheel forward 1 clicks

etc...

Krapuke

  • Guest
Re: Scroll middle wheel mouse
« Reply #2 on: November 22, 2018, 08:30:50 AM »
Thanks Kourou, As you are French it should be easer for me to reply in French but ... Anyway for other Guy.
This means That you need to do a loop  x times you need with 1 click.
That's hard as it is strange that the command is SCROLL and the action is Click.
Any idea or other way to do that from other people?

kourou

  • Jr. Member
  • **
  • Posts: 81
  • Anything that can go wrong will go wrong
    • FANNY (Discord)
Re: Scroll middle wheel mouse
« Reply #3 on: November 22, 2018, 11:38:52 AM »
the click in this case is not a left mouse click. click here means scroll unit.
*when we scroll it's not an analog action, but a digital one.*
you can use this algo (see attached).

Krapuke

  • Guest
Re: Scroll middle wheel mouse
« Reply #4 on: November 22, 2018, 12:41:26 PM »
Thanks Kourou, It seems almost the code I used:

Augmente la puissance de[5..50]

Say, 'Augmentation de la puissance laser de {CMDSEGMENT:1}'
Set small int (condition) [Power] value to the converted value of {CMDSEGMENT:1}
Start Loop While : [Power] Does Not Equal 0
    Scroll mouse wheel forward 1 click
    Set small int (condition) [Power] value as decremented by 1
End Loop


But I keep in mind your code ....
Thanks again


Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Scroll middle wheel mouse
« Reply #5 on: November 22, 2018, 01:00:05 PM »
That's a good example, Krapuke.  For the benefit of anybody reading along, you should try out the 'for' loop (repeat a certain number of times) as well:

Code: [Select]
Start Loop : Repeat [{CMDSEGMENT:1}] Times
    Scroll mouse wheel forward 1 click
    Pause 0.05 seconds
End Loop

That way you don't have to keep track of (and increment) a variable.

The pause is important as some games work on a polling mechanism, so, without the pause the actions may occur too quickly.

Krapuke

  • Guest
Re: Scroll middle wheel mouse
« Reply #6 on: November 24, 2018, 04:18:04 AM »
Thank's Gary,
I'll change my code for your exemple.

And you are right, I meet with my code a hard problem one time in SC
In my previous code I added a pause of  0,25 seconds
The problem is very strange, SC seems to zoom screen  and power increase again and again.
Very strange.
But SC is a beta version, no hoops, may be alpha version.

Then I'll try only repeat code and put a little pause between and try a less pause with 0.05s
I'll give you the result if any change....

Tanks again