FinalVersion Posted May 10, 2009 Share Posted May 10, 2009 I can't get my head around to whats wrong, help is defiantly appreciated. Ver() Func Hoz() $x = 1 $x = $x + 1 Do $jpos = MouseGetPos() MouseMove($JPos[0] + 17, 45, 0) Sleep(100) Ver() Until $x = 3 EndFunc ;==>Hoz Func Ver() $i = 1 Do $Pos = MouseGetPos() MouseMove($Pos[0], $Pos[1] + 10, 0) Sleep(100) $i = $i +1 Until $i = 15 Hoz() EndFunc [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
BrettF Posted May 10, 2009 Share Posted May 10, 2009 How about you be more specific to whats not working? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
FinalVersion Posted May 10, 2009 Author Share Posted May 10, 2009 How about you be more specific to whats not working?X doesn't increase. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Yashied Posted May 10, 2009 Share Posted May 10, 2009 I can't get my head around to whats wrong, help is defiantly appreciated. expandcollapse popupVer() Func Hoz() $x = 1 $x = $x + 1 Do $jpos = MouseGetPos() MouseMove($JPos[0] + 17, 45, 0) Sleep(100) Ver() Until $x = 3 EndFunc ;==>Hoz Func Ver() $i = 1 Do $Pos = MouseGetPos() MouseMove($Pos[0], $Pos[1] + 10, 0) Sleep(100) $i = $i +1 Until $i = 15 Hoz() EndFuncoÝ÷ Ûú®¢×ºÚ"µÍ B[ÈÞ B ÌÍÞHB ÌÍÚÜÈH[ÝÙQÙ]ÜÊ B[ÝÙS[ÝJ ÌÍÒÜÖÌH ÈMË K BÛY L B BBIÌÍÞH ÌÍÞ ÈB[[ ÌÍÞHÂ[[ÈÏOIÝÒÞ[È B ÌÍÚHHB ÌÍÔÜÈH[ÝÙQÙ]ÜÊ B[ÝÙS[ÝJ ÌÍÔÜÖÌK ÌÍÔÜÖÌWH ÈL BÛY L B ÌÍÚHH ÌÍÚH ÌB[[ ÌÍÚHHMBÞ B[[ My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
BrettF Posted May 10, 2009 Share Posted May 10, 2009 Yes it does... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
FinalVersion Posted May 10, 2009 Author Share Posted May 10, 2009 (edited) Thanks, but X still doesn't increase. @BrettF So the script stops for you? Edited May 10, 2009 by Godly [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Yashied Posted May 10, 2009 Share Posted May 10, 2009 X doesn't increase.Godly, you are the answer to your question. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
FinalVersion Posted May 10, 2009 Author Share Posted May 10, 2009 Godly, you are the answer to your question.How So..? [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Qousio Posted May 10, 2009 Share Posted May 10, 2009 (edited) How So..? I think it doesn't increase because you have made a weird recursion. Your Do-Until loop should work until $X is 3. But $X doesn't increase inside the loop, the second function starts the first function, but the first function is still running! Thus you get an awkward recursion that causes problems. Ver() Func Hoz() $x = 1 $x = $x + 1 Do $jpos = MouseGetPos() MouseMove($JPos[0] + 17, 45, 0) Sleep(100) Ver() Until $x = 3 EndFunc;==>Hoz Func Ver() $i = 1 Do $Pos = MouseGetPos() MouseMove($Pos[0], $Pos[1] + 10, 0) Sleep(100) $i = $i +1 Until $i = 15 EndFunc MsgBox( 0, "", "Everything works!" ) This works =P Or if Increasing $x is what you also need Ver() Func Hoz() $x = 1 Do $x +=1 $jpos = MouseGetPos() MouseMove($JPos[0] + 17, 45, 0) Sleep(100) Ver() Until $x = 3 EndFunc;==>Hoz Func Ver() $i = 1 Do $Pos = MouseGetPos() MouseMove($Pos[0], $Pos[1] + 10, 0) Sleep(100) $i = $i +1 Until $i = 15 EndFunc MsgBox( 0, "", "Everything works!" ) Edited May 10, 2009 by Qousio Link to comment Share on other sites More sharing options...
AlmarM Posted May 10, 2009 Share Posted May 10, 2009 Is this what your trying to do? Ver() Func Hoz() $x = 1 Do $jpos = MouseGetPos() MouseMove($JPos[0] + 17, 45, 0) Sleep(100) $x += 1 Until $x = 3 Ver() EndFunc ;==>Hoz Func Ver() $i = 1 Do $Pos = MouseGetPos() MouseMove($Pos[0], $Pos[1] + 10, 0) Sleep(100) $i += 1 Until $i = 15 Hoz() EndFunc AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
BrettF Posted May 10, 2009 Share Posted May 10, 2009 What happened to the wonderful For...Next loop over Do...Until $var = x... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Qousio Posted May 10, 2009 Share Posted May 10, 2009 What happened to the wonderful For...Next loop over Do...Until $var = x... Its alive!!For(x=1; x<100; x++) {} Link to comment Share on other sites More sharing options...
FinalVersion Posted May 10, 2009 Author Share Posted May 10, 2009 Ok I'll explain what i want. $Downs = InputBox("Downs", "Move Down How Many Times?") $Rights = InputBox("Rights", "Move Right How Many Times?") Just say the user enters 5 for downs & 4 for rights. The mouse would move down +10 from it current location however many downs. Then it would move to the original location but to the right + 15, then do that over until rights has reached what the user entered. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Qousio Posted May 10, 2009 Share Posted May 10, 2009 (edited) Ok I'll explain what i want. $Downs = InputBox("Downs", "Move Down How Many Times?") $Rights = InputBox("Rights", "Move Right How Many Times?") Just say the user enters 5 for downs & 4 for rights. The mouse would move down +10 from it current location however many downs. Then it would move to the original location but to the right + 15, then do that over until rights has reached what the user entered. $Downs = 5 $Rights = 4 $Pos = MouseGetPos() For $i=0 to $Downs MouseMove( $Pos[0], $Pos[1]+$i*10 ) Next For $i=0 to $Rights MouseMove( $Pos[0]+$i*15, $Pos[1] ) Next #Edit: Fixed it... @_@ #Edit2: Mad at the edit system, chopped off part of my code! Edited May 10, 2009 by Qousio Link to comment Share on other sites More sharing options...
FinalVersion Posted May 10, 2009 Author Share Posted May 10, 2009 $Pos = MouseGetPos() For 0 to $Downs Step 1 MouseMove( $Pos[0], $Pos[1]+$Downs*10 ) Next For 0 to $Rights Step 1 MouseMove( $Pos[0]+$Rights*15, $Pos[1] ) Next Inb4theclock Thanks, But it doesn't work [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
BrettF Posted May 10, 2009 Share Posted May 10, 2009 Like this? $max_x = 5 $max_y = 5 $original_pos = MouseGetPos() For $i = 1 to $max_y $j = MouseGetPos () MouseMove($j[0], $j[1] + 10) Next MouseMove ($original_pos[0], $original_pos[1]) For $i = 1 to $max_y $j = MouseGetPos () MouseMove($j[0] + 17, 45) Next Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Qousio Posted May 10, 2009 Share Posted May 10, 2009 Thanks, But it doesn't work Look above, I fixed it... I'm still new to Autoit syntax and often try something similair to C++ which doesnt work =P Link to comment Share on other sites More sharing options...
FinalVersion Posted May 10, 2009 Author Share Posted May 10, 2009 @BrettF Kind Of. Better Explain It Better I want it to go down squares in minesweeper then when it reaches the bottom defined by the user, it goes to the next column. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Qousio Posted May 10, 2009 Share Posted May 10, 2009 @BrettF Kind Of. Better Explain It Better I want it to go down squares in minesweeper then when it reaches the bottom defined by the user, it goes to the next column. $Downs = 5 $Rights = 4 $Pos = MouseGetPos() For $i=0 to $Downs MouseMove( $Pos[0], $Pos[1]+$i*10 ) Next $Pos = MouseGetPos() For $i=0 to $Rights MouseMove( $Pos[0]+$i*15, $Pos[1] ) Next Link to comment Share on other sites More sharing options...
FinalVersion Posted May 10, 2009 Author Share Posted May 10, 2009 Look above, I fixed it... I'm still new to Autoit syntax and often try something similair to C++ which doesnt work =PYours works, except i want it to stop @ each down, then do the next down. After all downs down it moves across a right then does the downs again, etc. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] 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