PhoenixPower Posted November 5, 2006 Share Posted November 5, 2006 I needed a function to move the mouse in a certain angle, but couldnt find a existing one. So I dug up my math books and came up with this. Func _MouseMoveAngle($i_Degrees, $i_Lenght, $i_Speed = 1) $i_xChange = Sin($i_Degrees / 57.2957795130823) * $i_Lenght $i_yChange = Cos($i_Degrees / 57.2957795130823) * $i_Lenght $ai_cPos = MouseGetPos() MouseMove($ai_cPos[0] + $i_xChange, $ai_cPos[1] - $i_yChange, $i_Speed) EndFunc Link to comment Share on other sites More sharing options...
theguy0000 Posted November 5, 2006 Share Posted November 5, 2006 cool! nice job!! The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
Skrip Posted November 6, 2006 Share Posted November 6, 2006 (edited) Open Paint and click pencil. Then run this. Good job. expandcollapse popupSleep(1500) WinActivate("untitled - Paint") MouseDown("left") _MouseMoveAngle(45, 150, 10) _MouseMoveAngle(-45, 150, 10) _MouseMoveAngle(180, 210, 10) _MouseMoveAngle(0, 75, 10) _MouseMoveAngle(270, 300, 10) _MouseMoveAngle(360, 50, 10) _MouseMoveAngle(-270, 300, 10) MouseUp("left") Func _MouseMoveAngle($i_Degrees, $i_Lenght, $i_Speed = 1) $i_xChange = Sin($i_Degrees / 57.2957795130823) * $i_Lenght $i_yChange = Cos($i_Degrees / 57.2957795130823) * $i_Lenght $ai_cPos = MouseGetPos() MouseMove($ai_cPos[0] + $i_xChange, $ai_cPos[1] - $i_yChange, $i_Speed) EndFunc oÝ÷ Øw«{ljz-êèãåiDz¢êæ¢ëv'櫶¢ÛhíêZ{pwhÂØ^»§Ö®¶s`¥6ÆVWS¥vä7FfFRgV÷C·VçFFÆVBÒçBgV÷C²¤Ö÷W6TF÷vâgV÷C¶ÆVgBgV÷C²¥ôÖ÷W6TÖ÷fTævÆRCRÂSÂ¥ôÖ÷W6TÖ÷fTævÆRÓCRÂSÂ¥ôÖ÷W6TÖ÷fTævÆRÂ#Â¥ôÖ÷W6TÖ÷fTævÆRÂsRÂ¥ôÖ÷W6TÖ÷fTævÆR#sÂ3Â¥ôÖ÷W6TÖ÷fTævÆR3cÂSÂ¥ôÖ÷W6TÖ÷fTævÆRÓ#sÂ3Â¥ôÖ÷W6TÖ÷fTævÆRÓCRÂSÂ¥ôÖ÷W6TÖ÷fTævÆRCRÂSÂ¥ôÖ÷W6TÖ÷fTævÆRÓÂ#Â¥ôÖ÷W6TÖ÷fTævÆRÓÂsRÂ¥ôÖ÷W6TÖ÷fTævÆRÓ#sÂ3Â¥ôÖ÷W6TÖ÷fTævÆRÓ3cÂSÂ¥ôÖ÷W6TÖ÷fTævÆR#sÂ3Â¥ôÖ÷W6TÖ÷fTævÆRCRÂSÂ¥ôÖ÷W6TÖ÷fTævÆRÓCRÂSÂ¥ôÖ÷W6TÖ÷fTævÆRÂ#Â¥ôÖ÷W6TÖ÷fTævÆRÂsRÂ¥ôÖ÷W6TÖ÷fTævÆR#sÂ3Â¥ôÖ÷W6TÖ÷fTævÆR3cÂSÂ¥ôÖ÷W6TÖ÷fTævÆRÓ#sÂ3Â¥ôÖ÷W6TÖ÷fTævÆRÓCRÂSÂ¥ôÖ÷W6TÖ÷fTævÆRCRÂSÂ¥ôÖ÷W6TÖ÷fTævÆRÓÂ#Â¥ôÖ÷W6TÖ÷fTævÆRÓÂsRÂ¥ôÖ÷W6TÖ÷fTævÆRÓ#sÂ3Â¥ôÖ÷W6TÖ÷fTævÆRÓ3cÂSÂ¥ôÖ÷W6TÖ÷fTævÆR#sÂ3Â¥ôÖ÷W6TÖ÷fTævÆRCRÂSÂ¥ôÖ÷W6TÖ÷fTævÆRÓCRÂSÂ¥ôÖ÷W6TÖ÷fTævÆRÂ#Â¥ôÖ÷W6TÖ÷fTævÆRÂsRÂ¥ôÖ÷W6TÖ÷fTævÆR#sÂ3Â¥ôÖ÷W6TÖ÷fTævÆR3cÂSÂ¥ôÖ÷W6TÖ÷fTævÆRÓ#sÂ3¤Ö÷W6UWgV÷C¶ÆVgBgV÷C²¤gVæ2ôÖ÷W6TÖ÷fTævÆRb33c¶ôFVw&VW2Âb33c¶ôÆVævBÂb33c¶õ7VVBÒ¢b33c¶÷6ævRÒ6âb33c¶ôFVw&VW2òSrã#SssS3#2¢b33c¶ôÆVæv@¢b33c¶÷6ævRÒ6÷2b33c¶ôFVw&VW2òSrã#SssS3#2¢b33c¶ôÆVæv@¢b33c¶ö5÷2ÒÖ÷W6TvWE÷2¢Ö÷W6TÖ÷fRb33c¶ö5÷5³Ò²b33c¶÷6ævRÂb33c¶ö5÷5³ÒÒb33c¶÷6ævRÂb33c¶õ7VVB¤VæDgVæ0 oÝ÷ غ(É"Ö¥GrX}ÚºÚ"µÍÛY ML BÚ[XÝ]]J ][ÝÝ[]YHZ[ ][ÝÊB[ÝÙQÝÛ ][ÝÛY ][ÝÊBÓ[ÝÙS[ÝP[ÛJ KMLL BÓ[ÝÙS[ÝP[ÛJM KMLL BÓ[ÝÙS[ÝP[ÛJNLL BÓ[ÝÙS[ÝP[ÛJ ÍKL BÓ[ÝÙS[ÝP[ÛJÌÌL BÓ[ÝÙS[ÝP[ÛJÍ LL BÓ[ÝÙS[ÝP[ÛJLÌÌL BÓ[ÝÙS[ÝP[ÛJM KMLL BÓ[ÝÙS[ÝP[ÛJ KMLL BÓ[ÝÙS[ÝP[ÛJLNLL BÓ[ÝÙS[ÝP[ÛJL ÍKL BÓ[ÝÙS[ÝP[ÛJLÌÌL BÓ[ÝÙS[ÝP[ÛJLÍ LL BÓ[ÝÙS[ÝP[ÛJÌÌL BÓ[ÝÙS[ÝP[ÛJ KMLL BÓ[ÝÙS[ÝP[ÛJM KMLL BÓ[ÝÙS[ÝP[ÛJNLL BÓ[ÝÙS[ÝP[ÛJ ÍKL BÓ[ÝÙS[ÝP[ÛJÌÌL BÓ[ÝÙS[ÝP[ÛJÍ LL BÓ[ÝÙS[ÝP[ÛJLÌÌL BÓ[ÝÙS[ÝP[ÛJM KMLL BÓ[ÝÙS[ÝP[ÛJ KMLL BÓ[ÝÙS[ÝP[ÛJLNLL BÓ[ÝÙS[ÝP[ÛJL ÍKL BÓ[ÝÙS[ÝP[ÛJLÌÌL BÓ[ÝÙS[ÝP[ÛJLÍ LL BÓ[ÝÙS[ÝP[ÛJÌÌL BÓ[ÝÙS[ÝP[ÛJ KMLL BÓ[ÝÙS[ÝP[ÛJM KMLL BÓ[ÝÙS[ÝP[ÛJNLL BÓ[ÝÙS[ÝP[ÛJ ÍKL BÓ[ÝÙS[ÝP[ÛJÌÌL BÓ[ÝÙS[ÝP[ÛJÍ LL BÓ[ÝÙS[ÝP[ÛJLÌÌL B[ÝÙU ][ÝÛY ][ÝÊB[ÈÓ[ÝÙS[ÝP[ÛJ ÌÍÚWÑYÜYË ÌÍÚWÓ[Ú ÌÍÚWÔÜYYHJB ÌÍÚWÞÚ[ÙHHÚ[ ÌÍÚWÑYÜYÈÈ ËMMÍÎMLLÌÊH ÌÍÚWÓ[Ú ÌÍÚWÞPÚ[ÙHHÛÜÊ ÌÍÚWÑYÜYÈÈ MËMMÍÎMLLÌÊH ÌÍÚWÓ[Ú ÌÍØZWØÔÜÈH[ÝÙQÙ]ÜÊ B[ÝÙS[ÝJ ÌÍØZWØÔÜÖÌH È ÌÍÚWÞÚ[ÙK ÌÍØZWØÔÜÖÌWHH ÌÍÚWÞPÚ[ÙK ÌÍÚWÔÜYY B[[ Edited November 6, 2006 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Busti Posted November 6, 2006 Share Posted November 6, 2006 (edited) Thats nice, but why are : $i_xChange = Sin($i_Degrees / 57.2957795130823) * $i_Lenght $i_yChange = Cos($i_Degrees / 57.2957795130823) * $i_Lenght the same return values ? Like : $i_xChange == $i_yChange Edited November 6, 2006 by Busti My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity Link to comment Share on other sites More sharing options...
RazerM Posted November 6, 2006 Share Posted November 6, 2006 (edited) Nice UDF! @Busti They are not the same, run this and you will see "FalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalse FalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalse" expandcollapse popupSleep(1500) WinActivate("untitled - Paint") MouseDown("left") _MouseMoveAngle(45, 150, 10) _MouseMoveAngle(-45, 150, 10) _MouseMoveAngle(180, 210, 10) _MouseMoveAngle(0, 75, 10) _MouseMoveAngle(270, 300, 10) _MouseMoveAngle(360, 50, 10) _MouseMoveAngle(-270, 300, 10) _MouseMoveAngle(-45, 150, 10) _MouseMoveAngle(45, 150, 10) _MouseMoveAngle(-180, 210, 10) _MouseMoveAngle(-0, 75, 10) _MouseMoveAngle(-270, 300, 10) _MouseMoveAngle(-360, 50, 10) _MouseMoveAngle(270, 300, 10) _MouseMoveAngle(45, 150, 10) _MouseMoveAngle(-45, 150, 10) _MouseMoveAngle(180, 210, 10) _MouseMoveAngle(0, 75, 10) _MouseMoveAngle(270, 300, 10) _MouseMoveAngle(360, 50, 10) _MouseMoveAngle(-270, 300, 10) _MouseMoveAngle(-45, 150, 10) _MouseMoveAngle(45, 150, 10) _MouseMoveAngle(-180, 210, 10) _MouseMoveAngle(-0, 75, 10) _MouseMoveAngle(-270, 300, 10) _MouseMoveAngle(-360, 50, 10) _MouseMoveAngle(270, 300, 10) _MouseMoveAngle(45, 150, 10) _MouseMoveAngle(-45, 150, 10) _MouseMoveAngle(180, 210, 10) _MouseMoveAngle(0, 75, 10) _MouseMoveAngle(270, 300, 10) _MouseMoveAngle(360, 50, 10) _MouseMoveAngle(-270, 300, 10) MouseUp("left") Func _MouseMoveAngle($i_Degrees, $i_Lenght, $i_Speed = 1) $i_xChange = Sin($i_Degrees / 7.2957795130823) * $i_Lenght $i_yChange = Cos($i_Degrees / 57.2957795130823) * $i_Lenght ConsoleWrite($i_xChange=$i_yChange) $ai_cPos = MouseGetPos() MouseMove($ai_cPos[0] + $i_xChange, $ai_cPos[1] - $i_yChange, $i_Speed) EndFunc Edited November 6, 2006 by RazerM My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
jvanegmond Posted November 6, 2006 Share Posted November 6, 2006 (edited) Thats nice, but why are :the same return values ?Cos(360) = 1Sin(360) = 0You can see that there's quite a big difference between Sine and Cosine.Btw, Firestorm, very cool script's! I tried all three of them. Edited November 6, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
Busti Posted November 8, 2006 Share Posted November 8, 2006 Nice UDF! @Busti They are not the same, run this and you will see "FalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalse FalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalse" expandcollapse popupSleep(1500) WinActivate("untitled - Paint") MouseDown("left") _MouseMoveAngle(45, 150, 10) _MouseMoveAngle(-45, 150, 10) _MouseMoveAngle(180, 210, 10) _MouseMoveAngle(0, 75, 10) _MouseMoveAngle(270, 300, 10) _MouseMoveAngle(360, 50, 10) _MouseMoveAngle(-270, 300, 10) _MouseMoveAngle(-45, 150, 10) _MouseMoveAngle(45, 150, 10) _MouseMoveAngle(-180, 210, 10) _MouseMoveAngle(-0, 75, 10) _MouseMoveAngle(-270, 300, 10) _MouseMoveAngle(-360, 50, 10) _MouseMoveAngle(270, 300, 10) _MouseMoveAngle(45, 150, 10) _MouseMoveAngle(-45, 150, 10) _MouseMoveAngle(180, 210, 10) _MouseMoveAngle(0, 75, 10) _MouseMoveAngle(270, 300, 10) _MouseMoveAngle(360, 50, 10) _MouseMoveAngle(-270, 300, 10) _MouseMoveAngle(-45, 150, 10) _MouseMoveAngle(45, 150, 10) _MouseMoveAngle(-180, 210, 10) _MouseMoveAngle(-0, 75, 10) _MouseMoveAngle(-270, 300, 10) _MouseMoveAngle(-360, 50, 10) _MouseMoveAngle(270, 300, 10) _MouseMoveAngle(45, 150, 10) _MouseMoveAngle(-45, 150, 10) _MouseMoveAngle(180, 210, 10) _MouseMoveAngle(0, 75, 10) _MouseMoveAngle(270, 300, 10) _MouseMoveAngle(360, 50, 10) _MouseMoveAngle(-270, 300, 10) MouseUp("left") Func _MouseMoveAngle($i_Degrees, $i_Lenght, $i_Speed = 1) $i_xChange = Sin($i_Degrees / 7.2957795130823) * $i_Lenght $i_yChange = Cos($i_Degrees / 57.2957795130823) * $i_Lenght ConsoleWrite($i_xChange=$i_yChange) $ai_cPos = MouseGetPos() MouseMove($ai_cPos[0] + $i_xChange, $ai_cPos[1] - $i_yChange, $i_Speed) EndFunc becouse the math is diff... : $i_xChange = Sin($i_Degrees / 7.2957795130823) * $i_Lenght $i_yChange = Cos($i_Degrees / 57.2957795130823) * $i_Lenght change it to : $i_xChange = Sin($i_Degrees / 57.2957795130823) * $i_Lenght $i_yChange = Cos($i_Degrees / 57.2957795130823) * $i_Lenght and test again. My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity Link to comment Share on other sites More sharing options...
RazerM Posted November 8, 2006 Share Posted November 8, 2006 Oops. Its still the same result though My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
ConsultingJoe Posted November 9, 2006 Share Posted November 9, 2006 Second hand CLOCK HotKeySet( "{esc}", "Quit" ) MouseMove( @DesktopWidth/2, @DesktopHeight/2 ) $pos = MouseGetPos() While 1 MouseMove( $pos[0], $pos[1], 0 ) _MouseMoveAngle( (360*@SEC)*.01, 100 ) WEnd Func _MouseMoveAngle($i_Degrees, $i_Lenght, $i_Speed = 1) $i_xChange = Sin($i_Degrees / 57.2957795130823) * $i_Lenght $i_yChange = Cos($i_Degrees / 57.2957795130823) * $i_Lenght $ai_cPos = MouseGetPos() MouseMove($ai_cPos[0] + $i_xChange, $ai_cPos[1] - $i_yChange, $i_Speed) EndFunc Func Quit() Exit EndFunc [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Link to comment Share on other sites More sharing options...
Skrip Posted November 9, 2006 Share Posted November 9, 2006 Heh nice zero cool! [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
ConsultingJoe Posted November 9, 2006 Share Posted November 9, 2006 Heh nice zero cool!ty [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Link to comment Share on other sites More sharing options...
RazerM Posted November 9, 2006 Share Posted November 9, 2006 I like the clock idea My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. 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