AutoItKing Posted June 21, 2006 Share Posted June 21, 2006 (edited) Here's a nice little scrap I found. It's nice. If your mouse goes within 2 pixels of the side, it moves it to the opposite side. While 1 $POS = MouseGetPos() If $POS[0] > @DesktopWidth - 2 Then MouseMove(1, $POS[1], 0) If $POS[0] < 2 Then MouseMove(@DesktopWidth, $POS[1], 0) If $POS[1] > @DesktopHeight - 2 Then MouseMove($POS[0], 1, 0) If $POS[1] < 2 Then MouseMove(@DesktopHeight, $POS[0], 0) Sleep(1) WEnd Edited June 21, 2006 by AutoItKing http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
Travmanx Posted June 21, 2006 Share Posted June 21, 2006 Good job, but I have no use for it lol Link to comment Share on other sites More sharing options...
Matrix112 Posted June 21, 2006 Share Posted June 21, 2006 (edited) Hi, i think this in a shortcut does the same Rundll32.exe user,swapmousebutton Edit: Sorry read it to fast :"> its not the same but here is another one Rundll32.exe user,setcursorpos Edited June 21, 2006 by Matrix112 Link to comment Share on other sites More sharing options...
i542 Posted June 21, 2006 Share Posted June 21, 2006 (edited) Cool! i542 EDIT: When I want wrap from up to down, it doesn't work! Edited June 21, 2006 by i542 I can do signature me. Link to comment Share on other sites More sharing options...
GaryFrost Posted June 21, 2006 Share Posted June 21, 2006 Here's a nice little scrap I found. It's nice. If your mouse goes within 2 pixels of the side, it moves it to the opposite side. While 1 $POS = MouseGetPos() If $POS[0] >= @DesktopWidth - 2 Then MouseMove(1, $POS[1], 0) If $POS[0] <= 2 Then MouseMove(@DesktopWidth, $POS[1], 0) If $POS[1] >= @DesktopHeight - 2 Then MouseMove($POS[0], 1, 0) If $POS[1] <= 2 Then MouseMove(@DesktopHeight, $POS[0], 0) Sleep(1) WEnd I believe the original scrap looked like HotKeySet("{Esc}","_Exit") _MouseWrap() Func _MouseWrap() TrayTip("hot key:","press Esc to exit",30) While 1 $pos = MouseGetPos() If $pos[0] < 2 Then MouseMove(@DeskTopWidth - 2, $pos[1], 1) If $pos[0] > @DeskTopWidth - 2 Then MouseMove(2, $pos[1], 1) If $pos[1] < 2 Then MouseMove($pos[0], @DesktopHeight - 2, 1) If $pos[1] > @DeskTopHeight - 2 Then MouseMove($pos[0], 2, 1) Sleep(1) Wend EndFunc Func _Exit() Exit EndFunc SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
RazerM Posted June 21, 2006 Share Posted June 21, 2006 It works but my Mouse Settings can do this itself Nice idea anyway 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...
Xenobiologist Posted June 21, 2006 Share Posted June 21, 2006 Hi, funny, cool & highly likely useless 4 me. But thanks! So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
AutoItKing Posted June 21, 2006 Author Share Posted June 21, 2006 (edited) Yeah, I found it in some folder I had, I haven't seen it in a long time, thought I'd share it. Here's something funny, make your mouse go in circles, looks weird! Edited June 21, 2006 by AutoItKing http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
AutoItKing Posted June 21, 2006 Author Share Posted June 21, 2006 I believe the original scrap looked like HotKeySet("{Esc}","_Exit") _MouseWrap() Func _MouseWrap() TrayTip("hot key:","press Esc to exit",30) While 1 $pos = MouseGetPos() If $pos[0] < 2 Then MouseMove(@DeskTopWidth - 2, $pos[1], 1) If $pos[0] > @DeskTopWidth - 2 Then MouseMove(2, $pos[1], 1) If $pos[1] < 2 Then MouseMove($pos[0], @DesktopHeight - 2, 1) If $pos[1] > @DeskTopHeight - 2 Then MouseMove($pos[0], 2, 1) Sleep(1) Wend EndFunc Func _Exit() Exit EndFuncWhere'd you find that? http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
erifash Posted June 22, 2006 Share Posted June 22, 2006 ...Out of my topic? My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
AutoItKing Posted June 22, 2006 Author Share Posted June 22, 2006 Oooo, sorry, didn't know you made it. I didn't know if I made it or someone else did. Sorry! http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
GaryFrost Posted June 22, 2006 Share Posted June 22, 2006 ...Out of my topic?Didn't remember who did it, just know that I copied and put it in my scraps almost 2 years ago SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 22, 2006 Moderators Share Posted June 22, 2006 Didn't remember who did it, just know that I copied and put it in my scraps almost 2 years ago http://www.autoitscript.com/forum/index.ph...Then+MouseMove( Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
GaryFrost Posted June 22, 2006 Share Posted June 22, 2006 http://www.autoitscript.com/forum/index.ph...Then+MouseMove(That was 2 months after erifash posted it SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 22, 2006 Moderators Share Posted June 22, 2006 That was 2 months after erifash posted it I found 2 of them, and it was 2 years ago, so I thought it might be that one. (and still can't find that post lol). Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
james3mg Posted June 22, 2006 Share Posted June 22, 2006 (edited) A question I've had that this code brings to mind - When two monitors are configured, this script only keeps the cursor on screen 1. Is there any way (registry entry, etc) to find out: 1) If there is a second monitor with the desktop extended onto it? 2) If yes to 1, what the desktop size of monitor(s) 2+ is/are? 3) If yes to 1, the "offset" of monitor(s) 2+ to monitor 1, since they could be above/below/diagonal, etc. Scripts like this MouseWrap or like some screensavers I've made in AutoIt (they only show up on Monitor 1, leaving monitor 2 wide open) would really benefit from this knowledge, and I haven't been able to find it thus far... Thanks Edited June 22, 2006 by james3mg "There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110 Link to comment Share on other sites More sharing options...
RazerM Posted June 22, 2006 Share Posted June 22, 2006 (edited) Wrong thread :"> Edited June 22, 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...
james3mg Posted June 22, 2006 Share Posted June 22, 2006 (edited) This does not make 'real' virtual desktops. For example when desktop two is active it hides the windows on the other desktops. It remembers what windows belong to which desktop by using an ini file. It was not my understanding that this makes any kind of virtual desktop at all...doesn't this just cause your mouse to jump ("wrap") to the other side like an old atari game?But, this code would make a nice "switch desktops" method for the Pangaea Desktops program in this thread. I am just interested in finding out if this could be modified to allowing two real monitors sitting side-by-side connected thru a dual-video card. Edited June 22, 2006 by james3mg "There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110 Link to comment Share on other sites More sharing options...
RazerM Posted June 22, 2006 Share Posted June 22, 2006 (edited) Wrong thread lol. Sorry for my idiocy. :"> Edited June 22, 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...
AutoItKing Posted June 22, 2006 Author Share Posted June 22, 2006 Wrong thread lol. Sorry for my idiocy. :">No problem, just try not to do it again? http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] 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