Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #25  
Old 05-26-2007, 11:12 AM
juanjiviris juanjiviris is offline
Junior Member
 
Join Date: May 2007
Posts: 2
Default Re: Stars Move to Urgent Table & Auto Time Bank Clicker - New AHK Scr

Hello, well, this will be my 1st post ever in 2+2, and I'm happy to say its not for asking something, it will be for helping someone, so I'm happy with that.

I love this script, been using it for a few days, and as I know something about programming (not much, but a little), I made some changes in the script for my own use.

As I saw that SilentNoise asked for something that I already made, I'm going to post here the piece of code you need to change to make what you asked for...

you need to find the line of code where the mouse is positioned, near the end of the script, the line is this one:

MouseMove, x3, y3, 0

and CHANGE that line for this piece of code next...

<font class="small">Code:</font><hr /><pre>

; THIS IS MY SCRIPT CHANGE TO KNOW IF THE MOUSE IS ALREADY INSIDE THE WINDOW WITH THE RED BORDER
; YOU HAVE TO REPLACE THE LINE OF CODE:
; MouseMove, x3, y3, 0
; WITH THIS WHOLE SCRIPT

mouseinside = 0
MouseGetPos, my_x, my_y
if (x &lt; my_x) and (my_x &lt; (x+w)) and (y &lt; my_y) and (my_y &lt; (y+h))
{
mouseinside = 1
}
if mouseinside = 0
{
Loop 10 ; Here you can change this number if you want the mouse to move faster or slower to the red window.
; Every unit is 1/4 of a second, so if you want 2 seconds, the number is 8, 3 seconds = 12
; this is set by default to wait 2.5 seconds (Loop 10), which is what works best for me.
{
MouseGetPos, my_x, my_y

if (x &lt; my_x) and (my_x &lt; (x+w)) and (y &lt; my_y) and (my_y &lt; (y+h))
{
mouseinside = 1
}

if (mouseinside = 1)
{
break
}

Sleep 250
}
if (mouseinside = 0)
{
MouseMove, x3, y3, 0
}
}

</pre><hr />


I need to explain something... the script is not as simple as check if mouse is over and not move the mouse if its over, its a little more complicated, because it didnt work too well for my style, so I added something extra...

I decided I didnt like that the mouse moved INSTANTLY right when the window required it, so I added a loop that checks the mouse position every quarter of a second, for a period you can set (I have mine set at 2.5 seconds).

In this time period, the script checks 4 times a second if the mouse has moved over the required window, if the mouse has moved over the window, it just stops and doesnt move the mouse.

If the time passes and you still didnt move the mouse over the window, then it will move automatically.

If you like that the mouse is moved instantly as always, just make the Loop be 1 (only 1/4 of a second wait)... and the mouse wont move if you already over the window with the red border.

Hope you like it and it works for you guys.

Answer in this thread if it doesnt work or something.

Btw, Dave, if you like it, feel free to add it to your script, I think it will be good for everybody.

If someone thinks about something to improve it, feel free to add the ideas here.
Reply With Quote
 


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


All times are GMT -4. The time now is 03:19 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.