techPowerUp! Forums

Go Back   techPowerUp! Forums > Software > General Software

Reply
 
Thread Tools
Old Feb 4, 2013, 10:40 PM   #1
CK011885
5 Posts
 
Join Date: Jan 2013
Posts: 12 (0.11/day)
Thanks: 2
Thanked 1 Time in 1 Post

Need Help With Simple AutoHotKey Script

Hi all, I'm trying to make a "simple" script but having some problems. I say "simple" because I've never done this before, but it's probably simple for someone more familiar. Basically, I want to make it where when I hold the right mouse button down, instead of right clicking it continuously Shift+Right Clicks (This is for a game).

I came up with this:

RButton::Send +{Click, Right}

Which basically does what I want only I can't hold down the mouse button to continuously repeat the script. I'm not looking for anything automated, and would like to have it only do this while I hold the mouse button down, and stop when I let go.

A friend of mine came up with this for me, which is almost perfect but for some reason in the game it causes the character to stutter step in between casts of the spell (Path of Exile). The character will cast the spell, stutter step forward, then cast again. The normal behavior in the game of holding Shift and casting a spell will keep you in place and not moving, which is what I'm looking for. He came up with this:

#IfWinActive Path of Exile
RButton::
loop
{
GetKeyState, RButtonState, RButton, P
if (RButtonState = "U") {
send +{RButton up}
break
} else {
send +{RButton down}
sleep, 10
}
}
#IfWinActive

Is anyone here familiar with creating scripts/macros that can possibly tweak this to make it behave like I'd like it to? He suggested removing the sleep line, which I tried and it didn't change the behavior.

Edit: Issue resolved, the following worked great:

#IfWinActive Path of Exile
*rbutton::Send {shift Down}{rbutton down}
*rbutton Up::Send {shift Up}{rbutton up}

Last edited by CK011885; Feb 5, 2013 at 12:11 AM.
CK011885 is offline  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need simple networking help please Black Panther Networking & Security 30 Mar 4, 2012 11:00 AM
Need help with a script CrAsHnBuRnXp Programming & Webmastering 9 Dec 31, 2011 05:39 AM
Need Help with Linux Startup Script ct5098 Programming & Webmastering 0 Mar 13, 2010 05:10 PM
help with a vb script crtecha Programming & Webmastering 1 Jan 27, 2009 05:44 PM
Very simple script in AJAX doesn't work... aximbigfan Programming & Webmastering 1 Mar 19, 2008 07:15 AM


All times are GMT. The time now is 09:43 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
no new posts