Flaming_Liberal90 Posted March 14, 2008 Share Posted March 14, 2008 Let me start by saying sorry, this is probably an easy solution, but I've searched the help program and haven't found it. So what I'm trying to do is add to a variable i.e. $var + 1. Here is exactly what I'm trying to do: $mouse = MouseGetCursor() If $mouse > 0 Then $pos = MouseGetPos() Do $pos[0] + 1 = $pos[0] PROBLEM $pos[1] + 1 = $pos[1] PROBLEM MouseMove($pos[0], $pos[1], 0) $mouse2 = MouseGetCursor() Until $mouse2 = 0 EndIf I'm want it do add one each time it goes through the do loop thereby making my mouse go diagonal. It may also be a problem that I'm adding to an array? I'm not sure.. Anyways thanks, sorry about the dumb question. Link to comment Share on other sites More sharing options...
cdm_Death Posted March 14, 2008 Share Posted March 14, 2008 I know I dealt with this before, I am nearly certain, that I put in a line, to re-define the value, by ading 1 to the value, in other words like... $var = 1 Blah Blah $var = $var + 1 Blah Blah $var = $var +1 Obviously my syntax is all wrong, but until one of the experts on here can help you, I'v done my best... Link to comment Share on other sites More sharing options...
cppman Posted March 14, 2008 Share Posted March 14, 2008 (edited) cdm_Death is right. Here is another way to do it.$mouse = MouseGetCursor() If $mouse > 0 Then $pos = MouseGetPos() Do $pos[0] += 1 $pos[1] += 1 MouseMove($pos[0], $pos[1], 0) $mouse2 = MouseGetCursor() Until $mouse2 = 0 EndIf Edited March 14, 2008 by chris95219 Miva OS Project Link to comment Share on other sites More sharing options...
Flaming_Liberal90 Posted March 14, 2008 Author Share Posted March 14, 2008 Thanks a lot, cdm_Death's method worked the other didn't seem to. Either way I've got it doing what I want it to, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now