autocasserole 0 Posted July 13, 2014 (edited) hiya. I was using AHK and had a number of scripts working pretty well, but would like to use AutoIt instead for a few reasons. Could someone help me get a pretty simple script working? Its this: #include <misc.au3> while(_ispressed(01) $pos = mousegetpos() mousemove($pos[0], $pos[1]-5) wend After compiling it and trying to run it, it saysLine 380 (File "filelocation"): Error: Missing right bracket ')' in expression. So I guess I'm missing a right bracket, but I've no idea where to put it. I'm also not sure if the part that "while(ispressed" needs to specify the left mouse button. If so, how do I add that too? I've tried a few things on my own and some have gotten rid of error messages, but result in the script not even running so that must of not been right. I've kind of run out of ideas and was failing to find the answer through searches so thought I'd ask here. All the script should do is move the mouse while holding down left click. Could you tell me what to do with it? Edited July 13, 2014 by autocasserole Share this post Link to post Share on other sites
Danp2 878 Posted July 13, 2014 while(_ispressed(01) You have unbalanced brackets in this line. [UDF] WebDriver Latest version Wiki FAQs Share this post Link to post Share on other sites
water 2,359 Posted July 13, 2014 Welcome to AutoIt and the forum! Would you please be so kind to give meaningful titles to your threads? Because everyone on this forum is looking for help My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
somdcomputerguy 103 Posted July 13, 2014 Both of the above posts are correct. You don't have a closing right bracket in the While line, and you should word the title of this thread more descriptively. Many people here just wont even look at a thread with a topic title like "need help with this script". Technically you would only need one set of brackets anyway, for the _IsPressed function. Also, the script is written incorrectly in other ways, as well. The script will end right away unless the left mouse button (01 is the correct parameter, BTW) is being pressed and held down when the script is started. This because the _IsPressed function is a parameter of the only While .. WEnd loop in your script. Refer to the Help file for proper usage of the _IsPressed function, and the While .. WEnd loop. Your use of both of the mouse functions is correct. Good luck, and as water said, welcome to the forum. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Share this post Link to post Share on other sites