Valuater Posted May 27, 2006 Share Posted May 27, 2006 Sigh I really need your help for five minutes. Please? $DW = @DesktopWidth $DH = @DesktopHeight $MS = 10;0 $VU = 50 $DW1 = $DW - $DW + $VU $DH1 = $DH - $DH + $VU $DH2 = $DH - $VU $DW2 = $DW - $VU MouseMove($VU,$VU, $MS) MouseMove($DW2, $VU, $MS) MouseMove($DW2, $DH2, $MS) $VU = $VU + $VU MouseMove($VU, $DH2, $MS) Ok so there is my code. What it does on the first loop is just go to the locations on the screen minus 50 pixes so it's about 1 inch from the edge all the way round. Now on the second loop I want to use the same variables but now have it 100 pixels from the edge but don't know how to do that on the loop. For instance I am now on the second loop and want to say $DW2 ( desktop width - 100 or - $vu - $vu ) but I don't know how to say it or say it in the most concise way As a newbie I want to put under MouseMove($DW2, $VU, $MS) $DW2 = $DW2 - $VU - $VU but if I do that it will mess up the next line down so I can't change the value of $DW2 until I have looped once. How would you do it? ok... give me a minute 8) Link to comment Share on other sites More sharing options...
Neoborn Posted May 27, 2006 Author Share Posted May 27, 2006 Also I have my variables set out on one line each but I want to have them globally accessible is there a way to do this? ~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT Link to comment Share on other sites More sharing options...
Valuater Posted May 27, 2006 Share Posted May 27, 2006 (edited) expandcollapse popup#include <GuiConstants.au3> ; ------------------------------------------------------------------------------ ; AutoIt Version: 3.1.1.123 ; Language: English ; Creator: Neoborn ; Email: <neo underscore born at hotmail dot com> ; Description Mouse Mover ; Version: 1.0 ; ------------------------------------------------------------------------------ ; ------------------------------------------------------------------------------ ; PseudoCode: ; 1. Find out the size of the desktop ; 2. Move the mouse to the top left hand corner to start from. ; 3. Move mouse around the full four sides of the screen 1" from the edge ; 4. Once a full circuit has been completed it will increase in speed & move ; in another 1" or so and complete another circuit ; 5. It will continue to do this until reaching the middle the another event ; will occur and the program will either loop or end. ; ------------------------------------------------------------------------------ Opt("MouseCoordMode", 0) ;============================================== ; Variables ;============================================== Dim $Right = @DesktopWidth - 50, $Bottom = @DesktopHeight - 50, $Left = 50, $Top = 50, $MS = 10, $Add = 50, $Sub = -50 ;============================================== ; Function Calls ;============================================== MouseMv() ;============================================== ; Functions ;============================================== Func MouseMv() $i = 0 While $i <= 5 MouseMove($Left, $Top, $MS) MouseMove($Right, $Top,$MS) MouseMove($Right, $Bottom,$MS) MouseMove($Left, $Bottom, $MS) $Right = $Right + $Sub $Bottom = $Bottom + $Sub $Left = $Left + $Add $Top = $Top + $Add $i = $i +1 WEnd EndFunc ;~ MsgBox(64, "Mouse Position is...", "Mouse position is " & $CMP[0] & " x " & $CMP[1]) ;~ MsgBox(64,"Your desktop is...", "Desktop size is: " & $DesktopW & " X " & $DesktopH) Also I have my variables set out on one line each but I want to have them globally accessible is there a way to do this? added DIM 8) Edited May 27, 2006 by Valuater Link to comment Share on other sites More sharing options...
Neoborn Posted May 27, 2006 Author Share Posted May 27, 2006 (edited) 1. Why include <GUIConstants.au3> ? 2. it's a beautiful thing. What has so far taken hours and hours and thought / reading you have done in less than five minutes Can you explain the differences between mine and yours ( apart from yours worked and mine didn't ) What is the difference in train of thought? You went about solving this in a different way, how did you figure out what you wanted to do? Are there any glaring faults or newbie thought patterns / coding that I should change or change my way of thinking? Thanks Neoborn Edited May 27, 2006 by Neoborn ~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT Link to comment Share on other sites More sharing options...
Valuater Posted May 27, 2006 Share Posted May 27, 2006 (edited) 1. Why include <GUIConstants.au3> ?2. it's a beautiful thing. What has so far taken hours and hours and thought / reading you have done in less than five minutes 1not needed... just was on my test page2Thank you... Earlier, you clearly stated that you wanted to do it... and for NO ONE to just do it for you8) Edited May 27, 2006 by Valuater Link to comment Share on other sites More sharing options...
Neoborn Posted May 27, 2006 Author Share Posted May 27, 2006 True that but I would love hints tips / guidance. Thank you for your help. ~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT Link to comment Share on other sites More sharing options...
Valuater Posted May 27, 2006 Share Posted May 27, 2006 True that but I would love hints tips / guidance. Thank you for your help. i could'nt hardly give guidence.. i did try.. without showing the complete concept hint replace the while with this While $Right > $Left And $Bottom > $Top 8) Link to comment Share on other sites More sharing options...
Valuater Posted May 27, 2006 Share Posted May 27, 2006 Can you explain the differences between mine and yours ( apart from yours worked and mine didn't ) What is the difference in train of thought? You went about solving this in a different way, how did you figure out what you wanted to do? Are there any glaring faults or newbie thought patterns / coding that I should change or change my way of thinking?Thanks Neoborn Ai cannot explain the difference, they are actually the same in concept... i just followed your lead for the end resultB & CIn the train of thought... i just guess i can more clearly see the end result i am looking for .. with applied experience, i am able to think my way there... almost before any script is writtenDthere are absolutely NO "glaring faults or newbie thought patterns" from your original post, direction, communication or efforts... your way of thinking is fine, however it will develop with experienceJust be patient...Valuater8) Link to comment Share on other sites More sharing options...
Neoborn Posted May 27, 2006 Author Share Posted May 27, 2006 Thank you I really appreciate yours and everyone else help <3 ~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT 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