Ilounah Posted August 20, 2016 Share Posted August 20, 2016 a simple script that if i hit button CTRL, the coordinates of recent mouse position and the values will be inserted on current position of the cursor. forum help me search this so I try to play around with the codes. $MousePos = MouseGetPos() , $MousePos[0] ; Mouse X position , $MousePos[1] ; Mouse Y position, If...Then ,ControlSetText or Send, _IsPressed so I get this, not sure if it will work because im on my work today, and company dont allowed to install 3rd party program, so basically im just drafting my script and work on my script if i got home. Local $hDLL = DllOpen("user32.dll") $MousePos = MouseGetPos() Run("notepad.exe") Local $hWnd = WinWait("[CLASS:Notepad]", "", 10) while 1 If _IsPressed("11", $hDLL) Then ControlSetText($hWnd, "", "Edit1", "$MousePos[0], $MousePos[1]" ) While _IsPressed("10", $hDLL) Sleep(250) WEnd wend Im still practicing and im not a real programmer just a hobby. Thanks. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 20, 2016 Moderators Share Posted August 20, 2016 Is there a question in there somewhere? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Ilounah Posted August 20, 2016 Author Share Posted August 20, 2016 Sorry, i cant not run the script right now, so i want to check if the script runs fine, thanks. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 20, 2016 Moderators Share Posted August 20, 2016 This is not a "test it for me" forum, it is a forum for helping people with their scripts. If you don't know whether you even have a problem I would suggest waiting until you can test it yourself. Xandy 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
AutoBert Posted August 20, 2016 Share Posted August 20, 2016 (edited) Please use code-tag's ( <> ) next time. The script wouldn't run: >Running AU3Check (3.3.14.2) from:C:\Program Files\AutoIt3 input:C:\Users\Bert\AutoIt3.My\Temp\test3.au3 "C:\Users\Bert\AutoIt3.My\Temp\test3.au3"(22,1) : error: missing EndIf. wend ^ "C:\Users\Bert\AutoIt3.My\Temp\test3.au3"(12,34) : REF: missing EndIf. If _IsPressed("11", $hDLL) Then ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Users\Bert\AutoIt3.My\Temp\test3.au3"(12,28) : error: _IsPressed(): undefined function. If _IsPressed("11", $hDLL) ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\Bert\AutoIt3.My\Temp\test3.au3 - 2 error(s), 0 warning(s) !>15:04:07 AU3Check ended. Press F4 to jump to next error.rc:2 +>15:04:07 AutoIt3Wrapper Finished. and after correcting the errors it will ignore mousemove and set allways the mousecoords from script begin. Edited August 20, 2016 by AutoBert SalamanderSoup 1 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