Norsestar Posted November 2, 2007 Share Posted November 2, 2007 (edited) on the first one, i've created a automated mouse script that is completely random, so it is [obviously] different pattern every time. and on the second one, is a script that i copied and pasted off the forums [i refuse to take the credit for somebody else's work]. every time i try to merge the code, one will execute, but not the other until i press the ESC key. i'm wanting both of them to execute simultaneously. [i tend to get bored at school, so it will give me some form of entertainment lol] Many thanks, The ZenMaster ____________________________________ Here is the code for the mouse movement: #NoTrayIcon SoundPlay(@WindowsDir & "\media\onestop.mid",0) ToolTip("Brought to you by: " & @crlf & "The ZenMaster" & @crlf & "With the assistance of: " & @crlf & "Rogueelite",0,@desktopheight -500) HotKeySet("{ESC}", "Terminate") $i = 0 while $i <= 1000 $x = random (0,1000,1) $y = random (15, 750,1) <= delete this line to keep it along the taskbar $s = random (0, 100) mousemove ($x,$y,$s) <= replace the $y with 748 [on my screen resolution, 748 is the center of the taskbar] $i = $i + 1 wend Func Terminate() Exit 0 EndFunc ______________________________ Here's the code for the start button script: Opt("WinTitleMatchMode", 4) HotKeySet("{ESC}", "Quit") Global $Quiting = False, $OriginalPos = ControlGetPos("classname=Shell_TrayWnd", "", "Button1") While Not $Quiting If PointInRect(MouseGetPos(), ControlGetPos("classname=Shell_TrayWnd", "", "Button1")) Then ControlMove("classname=Shell_TrayWnd", "", "Button1", Random(0, @DesktopWidth - $OriginalPos[2], 1), Default) EndIf WEnd ControlMove("classname=Shell_TrayWnd", "", "Button1", $OriginalPos[0], Default) Func Quit() $Quiting = True EndFunc Func PointInRect($p, $s) Local $dif = WinGetPos("classname=Shell_TrayWnd") $dif = $dif[1] Return ($p[0] >= $s[0]) And ($p[0] <= $s[0] + $s[2]) And ($p[1] - $dif >= $s[1]) And ($p[1] - $dif <= $s[1] + $s[3]) EndFunc Edited November 2, 2007 by Norsestar Education: Francis Tuttle Technology Center adult full-time studentCourse of study: Network TechnologyCurrent Course: Microsoft Windows Server 2003, Enterprise EditionCompleted Courses: CompTIA A+ Hardware and Software, Windows XP Professional, Microsoft Office 2003, Desktop Support and Troubleshooting, and CompTIA Network+Remaining Courses: Linux Administration, Copper Cabling, Microsoft Windows Server 2003, Enterprise EditionAchievements: @17 years old, scored 98th percentile U.S. in Algebra 2 and Advanced Chemistry. [i.e. Ranked top 2% in the nation of High School students] Link to comment Share on other sites More sharing options...
Nahuel Posted November 2, 2007 Share Posted November 2, 2007 I suppose this should work #NoTrayIcon Opt("WinTitleMatchMode", 4) SoundPlay(@WindowsDir & "\media\onestop.mid", 0) ToolTip("Brought to you by: " & @CRLF & "The ZenMaster" & @CRLF & "With the assistance of: " & @CRLF & "Rogueelite", 0, @DesktopHeight - 500) HotKeySet("{ESC}", "Terminate") $i = 0 Global $OriginalPos = ControlGetPos("classname=Shell_TrayWnd", "", "[CLASSNN:Button1]") While $i <= 1000 If PointInRect(MouseGetPos(), ControlGetPos("classname=Shell_TrayWnd", "", "[CLASSNN:Button1]")) Then ControlMove("classname=Shell_TrayWnd", "", "[CLASSNN:Button1]", Random(0, @DesktopWidth - $OriginalPos[2], 1), Default) EndIf $x = Random(0, 1000, 1) $y = Random(15, 750, 1) $s = Random(0, 100) MouseMove($x, $y, $s) $i = $i + 1 WEnd ControlMove("classname=Shell_TrayWnd", "", "[CLASSNN:Button1]", $OriginalPos[0], Default) Func PointInRect($p, $s) Local $dif = WinGetPos("classname=Shell_TrayWnd") $dif = $dif[1] Return ($p[0] >= $s[0]) And ($p[0] <= $s[0] + $s[2]) And ($p[1] - $dif >= $s[1]) And ($p[1] - $dif <= $s[1] + $s[3]) EndFunc ;==>PointInRect Func Terminate() Exit 0 EndFunc ;==>Terminate Link to comment Share on other sites More sharing options...
Norsestar Posted November 2, 2007 Author Share Posted November 2, 2007 will try it out, thank you Education: Francis Tuttle Technology Center adult full-time studentCourse of study: Network TechnologyCurrent Course: Microsoft Windows Server 2003, Enterprise EditionCompleted Courses: CompTIA A+ Hardware and Software, Windows XP Professional, Microsoft Office 2003, Desktop Support and Troubleshooting, and CompTIA Network+Remaining Courses: Linux Administration, Copper Cabling, Microsoft Windows Server 2003, Enterprise EditionAchievements: @17 years old, scored 98th percentile U.S. in Algebra 2 and Advanced Chemistry. [i.e. Ranked top 2% in the nation of High School students] Link to comment Share on other sites More sharing options...
Norsestar Posted November 2, 2007 Author Share Posted November 2, 2007 well, it worked, but the start button stopped moving after about 2 minutes and it got froze in the middle of the taskbar. even after i hit ESC lolz. but i kinda like it that way. the way i fixed the button was just to run the original script and ESC out of that. thanks for the help, that made progress ALOT faster. Thanks again, The ZenMaster Education: Francis Tuttle Technology Center adult full-time studentCourse of study: Network TechnologyCurrent Course: Microsoft Windows Server 2003, Enterprise EditionCompleted Courses: CompTIA A+ Hardware and Software, Windows XP Professional, Microsoft Office 2003, Desktop Support and Troubleshooting, and CompTIA Network+Remaining Courses: Linux Administration, Copper Cabling, Microsoft Windows Server 2003, Enterprise EditionAchievements: @17 years old, scored 98th percentile U.S. in Algebra 2 and Advanced Chemistry. [i.e. Ranked top 2% in the nation of High School students] 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