ruffle Posted June 7, 2018 Share Posted June 7, 2018 Hi: Newbie here to the forum although I've been using autoIT for years & absolutely love it! I'm trying to map the mouse output to DOWN arrow & nothing else. I ran across this old 2013 topic that seems to address this very issue, but when I try these includes #include <Misc.au3> #include "MouseOnEvent.au3" I get this error error: can't open include file "MouseOnEvent.au3" If you're interested I'm using an application in which I want to move through hundreds of screens each day looking at each every couple of seconds (but I need to determine how much time I need as I look). I am currently doing this using the down arrow key, but it is starting to kill my hand. I would like to use the middle mouse button instead (I have a foot mouse clicking device) so I can switch between my feet and hands. This sort of works, but it not only causes the DOWN arrow key to output, but it also causes the middle mouse to output it's "click." It's the click I need to eliminate. #include <Misc.au3> #include "MouseOnEvent.au3" Local $hDLL = DllOpen("user32.dll") Func MiddleMouseDOWN() Send("{DOWN}") EndFunc While 1 if _IsPressed("04") Then MiddleMouseDOWN() ; DOWN key #note lookup up _IsPressed >> 04 is the Middle Mouse Button per the help Function Reference if _IsPressed("1B") Then Exit ; ESC key Sleep(100) Wend DllClose($hDLL) Please help! Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted June 7, 2018 Share Posted June 7, 2018 Good morning @ruffle, and welcome to the AutoIt forum Did you include the "MouseOnEvent" library, in the Libraries folder of AutoIt? Best Regards. P.S.: You opened the Dll without using it, so, no needs to open if you don't want to use it Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Skeletor Posted June 7, 2018 Share Posted June 7, 2018 @ruffle Hi ruffle, check the explanations below. #include "MouseOnEvent.au3" ;Means your script and the UDF reside in the same location\folder #include "..\MouseOnEvent.au3" ;Means the UDF resides one folder above #include "C:\temp\MouseOnEvent.au3" ;Means your UDF resides in a specific location #include <MouseOnEvent.au3> ; Means the UDF resides in your includes folder "..AutoIt3\Include" Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI Link to comment Share on other sites More sharing options...
ruffle Posted June 8, 2018 Author Share Posted June 8, 2018 Thanks for you help so far, I've found my include folder: C:\Program Files (x86)\AutoIt3\Include I don't have the MouseOnEvent.au3 file. I found this link by searching: https://github.com/pf981/AutoItHotkeys/blob/master/MouseOnEvent.au3 Is it ok to simply copy the contents of this page into a text file and name it MouseOnEvent.au3 and then put it in my include folder? Just making sure I'm not creating a problem for myself further down the line; otherwise, I would just try it and see what happens. Please help! Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted June 8, 2018 Share Posted June 8, 2018 (edited) Good morning @ruffle You don't need to open the file, copy the content, and then create a new file with that name. Just download the file, and put in the Include folder of AutoIt. Since you did this, you're done, and you can include your "library" in the script with #include <MouseOnEvent.au3> at the top of your script Hope that helps. Best Regards. Edited June 8, 2018 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
ruffle Posted June 9, 2018 Author Share Posted June 9, 2018 Hi: It wasn't clear to me how to obtain the file, but eventually my searching turned up the *.au3 file on this forum in a *.zip file with other help. I now have it up & running. Thanks for the help everyone! 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