Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Help me with mousewheel script


  • Please log in to reply
10 replies to this topic
pjvillarante
  • Members
  • 15 posts
  • Last active: Dec 04 2015 04:43 AM
  • Joined: 20 Sep 2015

Hello what i want to happen is when i press F8 it will use WheelUp and WheelDown continuosly and when i press F8 again it will stop

this is my script

Can you please refine my script? i want to make it faster like WheelUpWheelDownWheelUpWheelDown.........

 

#MaxThreadsPerHotkey 2
SetKeyDelay,-1
$F8::
if (toggle:=!toggle)
While toggle {
BlockInput, MouseMoveOff
SendPlay {WheelUp}{WheelDown}
BlockInput, off
SendEvent {WheelDown}{WheelUp}
}
Return


gilliduck
  • Members
  • 109 posts
  • Last active: Nov 09 2015 01:07 AM
  • Joined: 19 Dec 2013

Why are you mixing a SendPlay and a SendEvent? Also you have a : in your if statement, this will not work well. You need it to be If (toggle = !toggle), otherwise you're assigning a value, not checking a value.



Xtra
  • Members
  • 954 posts
  • Last active: Jul 23 2016 09:04 PM
  • Joined: 29 Sep 2013

Why are you mixing a SendPlay and a SendEvent? Also you have a : in your if statement, this will not work well. You need it to be If (toggle = !toggle), otherwise you're assigning a value, not checking a value.

 

When using :

if (Toggle:=!Toggle)
{
    do stuff
}

Its using expression syntax with ( )

It toggles the variable and then the if statement checks if its true.

 

 

 

You will need a sleep in your while loop is your main problem of it not stopping.

Try this:

#MaxThreadsPerHotkey 2
SetKeyDelay,-1
 
$F8::
 
if (toggle:=!toggle)
While toggle {
    BlockInput, MouseMove
    Sendinput, {WheelDown}{WheelUp}
    BlockInput, MouseMoveOff
    Sleep 16
}

Return

HTH



pjvillarante
  • Members
  • 15 posts
  • Last active: Dec 04 2015 04:43 AM
  • Joined: 20 Sep 2015

thanks :) it works

i know it sounds dumb but can i make it look like im doing a WheelUp and WheelDown at the same time?

i know we cant do that with a physical mouse but can we do that in script?



Xtra
  • Members
  • 954 posts
  • Last active: Jul 23 2016 09:04 PM
  • Joined: 29 Sep 2013

thanks :) it works

i know it sounds dumb but can i make it look like im doing a WheelUp and WheelDown at the same time?

i know we cant do that with a physical mouse but can we do that in script?

 

If you did wheelup and wheeldown at the exact same time would it look like you did nothing?



pjvillarante
  • Members
  • 15 posts
  • Last active: Dec 04 2015 04:43 AM
  • Joined: 20 Sep 2015

Im playing ragnarok. When i do a wheel up it uses a certain skill and also with wheel down.

My question is it is possible to do a wheel up and wheel down in exact time?



Xtra
  • Members
  • 954 posts
  • Last active: Jul 23 2016 09:04 PM
  • Joined: 29 Sep 2013

Technically its not possible to do a wheelup and wheeldown at exactly the same time.



pjvillarante
  • Members
  • 15 posts
  • Last active: Dec 04 2015 04:43 AM
  • Joined: 20 Sep 2015

hmmm just a little help. can you make it faster? like 3 wheelups then followed by 3 wheeldowns and so on



Xtra
  • Members
  • 954 posts
  • Last active: Jul 23 2016 09:04 PM
  • Joined: 29 Sep 2013

You would change your send to:

Sendinput, {WheelDown 3}{WheelUp 3}


pjvillarante
  • Members
  • 15 posts
  • Last active: Dec 04 2015 04:43 AM
  • Joined: 20 Sep 2015

oh my god thank you very much

last question

what does #maxthreadperhotkeys do?



Shadowpheonix
  • Members
  • 268 posts
  • Last active:
  • Joined: 10 Feb 2014


oh my god thank you very much

last question

what does #maxthreadperhotkeys do?

 

#MaxThreadsPerHotkey