ido12357 Posted July 1, 2011 Share Posted July 1, 2011 I have a great need in a program that by buttoמ-click (on/off, preferably f2-12) converts each of my mouse clicks to their mirror position. E.g if I click on the top right corner, computer will react as if I clicked on the bottom left corner. Link to comment Share on other sites More sharing options...
GEOSoft Posted July 1, 2011 Share Posted July 1, 2011 Lets see some of the code you tried and then we will see if we can fix it for you. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
sleepydvdr Posted July 1, 2011 Share Posted July 1, 2011 (edited) You should put forward an effort to write your own script and if you run into problems, post it and we can help you fix the problems. Asking the forum to write something for you is frowned upon. I suggest looking up @DesktopDepth, @DesktopWidth, MouseGetPos and MouseMove in the help file. Those are the commands that you will need. Edited July 1, 2011 by sleepydvdr #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
JohnOne Posted July 1, 2011 Share Posted July 1, 2011 If it were me, I'd just turn my monitor upside down. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ido12357 Posted July 1, 2011 Author Share Posted July 1, 2011 (edited) I appriciate the offer though I lack the ability to script thisway. I do however have knowledge in Java scripting, though because I learned it from Runescape scripting, I never met any of the required programs to make such scripts. If you have, however, any idea of something I can do in return I'll be glad to do it. Edited July 1, 2011 by ido12357 Link to comment Share on other sites More sharing options...
JohnOne Posted July 1, 2011 Share Posted July 1, 2011 MouseGetPos() and MouseClick() functions and season with a pinch of mathematics. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ido12357 Posted July 2, 2011 Author Share Posted July 2, 2011 I have no idea how these fanctions work. Anyhow, public Class Pos { if(moudeClick()) //assuming boolean { this.mouse.setPos(-1*this.mouse.getPosX(),-1*this.mouse.getposY()) DO CLICK this.mouse.setPos(-1*this.mouse.getPosX(),-1*this.mouse.getposY()) } Does that count as a start? Geosoft I can write all setPos,getPosX and getposY classes if it makes it look more like a start Link to comment Share on other sites More sharing options...
ido12357 Posted July 2, 2011 Author Share Posted July 2, 2011 (edited) I have no idea how these fanctions work. Anyhow, public Class Mouse //Coordinate system, origin middle of the screen { private double posX; private double posY; void setPos(double posX,double posY) { this.posX=posX; this.posY=posY; } int getPosX() { return this.posX; } int getPosY() { return this.posY; } } if(mouseClick()) //assuming boolean { mouse.setPos(-1*mouse.getPosX(),-1*this.mouse.getposY()) mouse.click(); //clicks mouse.setPos(-1*this.mouse.getPosX(),-1*this.mouse.getposY()) } Does that count as a start? Geosoft *Sorry for the double post Edited July 2, 2011 by ido12357 Link to comment Share on other sites More sharing options...
monoscout999 Posted July 2, 2011 Share Posted July 2, 2011 (edited) You could use the tags in your posts, or [/autoit] [autoit]#include <misc.au3> ; Load an UDF(User-Defined-Function) lirary. HotKeySet("{esc}", "_exit") ; Bind ESC Key to Func _exit() HotKeySet("{F2}", "_StartStop") ; Bind F2 Key to Func _StartStop() Global $Switch = False ; Declare a Global variable and set it as true Global $dll = DllOpen("user32.dll") ; Nedeed for the _IsPressed() Func While Not $Switch ; Start loop. while Shitch is False. Sleep(4000) ; random sleep don`t mather. WEnd ; Close loop. Func _exit() ; Start Func proc. DllClose($dll) ; Always close your Dlls when you finish with them. Exit ; End Script Run. EndFunc ;==>_exit Func _StartStop() $Switch = Not $Switch ; Logical way to set a variable for a condition. consolewrite("Function = "&$Switch&@CRLF) ; Some console output text. While 1 ; While 1 = While true = Loop forever and ever. If Not $Switch Then ExitLoop ; Condition, If $switch not true then, exit bucle. If _IsPressed("01", $dll) Then ; Func _IsPressed, look the help file for more info. ; 01 = left mouse click. Sleep(100) ; Sleep for avoid multiple clicks. Mousemove(@DesktopWidth - Mousegetpos(0),@DesktopHeight - Mousegetpos(1),0) EndIf WEnd EndFunc ;==>_StartStopI hope you learn the AutoIt syntaxis, the tutorials in the help file are good, try it, and ask if you dont understand something(after you digging the Help file of course). Edited July 2, 2011 by monoscout999 Link to comment Share on other sites More sharing options...
ido12357 Posted July 2, 2011 Author Share Posted July 2, 2011 (edited) Would you please let me know where do I find details about all the available functions? Have a good day ;] and thanks alot for the help! Edited July 2, 2011 by ido12357 Link to comment Share on other sites More sharing options...
sleepydvdr Posted July 2, 2011 Share Posted July 2, 2011 I have no idea how these fanctions work.Anyhow,public Class Mouse //Coordinate system, origin middle of the screen{ private double posX; private double posY; void setPos(double posX,double posY) { this.posX=posX; this.posY=posY; } int getPosX() { return this.posX; } int getPosY() { return this.posY; } }if(mouseClick()) //assuming boolean{ mouse.setPos(-1*mouse.getPosX(),-1*this.mouse.getposY()) mouse.click(); //clicks mouse.setPos(-1*this.mouse.getPosX(),-1*this.mouse.getposY())}Does that count as a start? Geosoft*Sorry for the double postIt is currently 5AM here and I am running out of time, therefore I skipped all the read parts.I totaly misunderstood the role of numbers in the example scripts. (sorry for not making it autoit)$answer = MsgBox(4, X, Y)If $answer = 7 Then MsgBox(0, "AutoIt", "OK. Bye!") ExitEndIf What does 7 have to do with false and what is the role of 4? And most important, where do I find details about all the available functions?Have a good day ;] and thanks for the help!Are you serious at all? You skipped reading posts that were trying to help you? In a previous post, you said you cannot script "this way", but then you proceed to post code written in C++? C++ is a more complex programming language than AutoIt. I seriously doubt you wrote the code that you posted in your previous posts. I think you just want us to convert some code you ran across on the internet.Put forth some effort and read the help file. You tell us what return code 7 means for a messagebox. If you can write C++ code, I think you can understand the help file (I sucked at C++ but I understand AutoIt's well-written help file very well). Until then, you won't get any help from me. #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
sleepydvdr Posted July 2, 2011 Share Posted July 2, 2011 Just to clarify, ido357 changed his post from: It is currently 5AM here and I am running out of time, therefore I skipped all the read parts. I totaly misunderstood the role of numbers in the example scripts. (sorry for not making it autoit) $answer = MsgBox(4, X, Y) If $answer = 7 Then MsgBox(0, "AutoIt", "OK. Bye!") Exit EndIf What does 7 have to do with false and what is the role of 4? And most important, where do I find details about all the available functions? Have a good day ;] and thanks for the help! To this: Would you please let me know where do I find details about all the available functions? Have a good day ;] and thanks alot for the help! ido357: read the help file. It is full of great information and example scripts. If you need help anything you don't understand in there, just ask. We are not against help other with real scripts. But you have to do a little work yourself. #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
ido12357 Posted July 2, 2011 Author Share Posted July 2, 2011 Won't start to argue with you, afterall I am convinced all you do here is voulanterily helping people. Yes. I did write the script and no, as I wrote before it is not c++ its java. If you still have any doubts about it you may challenge me in anyway you want. I did start read it and wow this helpfile is amazing! I will be back soon Link to comment Share on other sites More sharing options...
ido12357 Posted July 2, 2011 Author Share Posted July 2, 2011 You could use the tags in your posts, or [/autoit] [autoit]#include <misc.au3> ; Load an UDF(User-Defined-Function) lirary. HotKeySet("{esc}", "_exit") ; Bind ESC Key to Func _exit() HotKeySet("{F2}", "_StartStop") ; Bind F2 Key to Func _StartStop() Global $Switch = False ; Declare a Global variable and set it as true Global $dll = DllOpen("user32.dll") ; Nedeed for the _IsPressed() Func While Not $Switch ; Start loop. while Shitch is False. Sleep(4000) ; random sleep don`t mather. WEnd ; Close loop. Func _exit() ; Start Func proc. DllClose($dll) ; Always close your Dlls when you finish with them. Exit ; End Script Run. EndFunc ;==>_exit Func _StartStop() $Switch = Not $Switch ; Logical way to set a variable for a condition. consolewrite("Function = "&$Switch&@CRLF) ; Some console output text. While 1 ; While 1 = While true = Loop forever and ever. If Not $Switch Then ExitLoop ; Condition, If $switch not true then, exit bucle. If _IsPressed("01", $dll) Then ; Func _IsPressed, look the help file for more info. ; 01 = left mouse click. Sleep(100) ; Sleep for avoid multiple clicks. Mousemove(@DesktopWidth - Mousegetpos(0),@DesktopHeight - Mousegetpos(1),0) EndIf WEnd EndFunc ;==>_StartStop I hope you learn the AutoIt syntaxis, the tutorials in the help file are good, try it, and ask if you dont understand something(after you digging the Help file of course). Totaly forgot to deeply thank you for both giving me the script and expose me to how easy it is using autoit! Next time I'll make my own! Link to comment Share on other sites More sharing options...
monoscout999 Posted July 2, 2011 Share Posted July 2, 2011 (edited) If you still have any doubts about it you may challenge me in anyway you want. That isn´t a nice start. Edited July 2, 2011 by monoscout999 Link to comment Share on other sites More sharing options...
somdcomputerguy Posted July 2, 2011 Share Posted July 2, 2011 ..wow this helpfile is amazing!It most certainly is! Check out the Wiki for more helpful links to tutorials. There's also video tutorials on Youtube. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Bert Posted July 2, 2011 Share Posted July 2, 2011 There is also AuotIt 1 2 3 in the example section The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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