VeryUniqueUsername Posted June 25, 2011 Posted June 25, 2011 (edited) Hi, I need to send an actual mouse move to not active window without getting it activated, not just to change it's coordinates, but an actual move of the cursor by strict amount of pixels, how can I do it with AutoIt and is it possible at all, help please, I hope to see some examples if possible. Edited June 25, 2011 by VeryUniqueUsername
JohnOne Posted June 25, 2011 Posted June 25, 2011 (edited) Yes it is. Something like this $aWinPos = WinGetPos("NonActiveWindowTitle") If Not @error Then MouseMove($aWinPos[0] + ($aWinPos[2] / 2), $aWinPos[1] + ($aWinPos[3] / 2)) Exit EndIf MsgBox(0,"Error","WinGetPos Error") Edited June 25, 2011 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
VeryUniqueUsername Posted June 25, 2011 Author Posted June 25, 2011 On 6/25/2011 at 11:49 AM, 'JohnOne said: Yes it is.Something like thisSad, but it moves my mouse when I'm doing something, so it doesn't affect the needed background window.
JohnOne Posted June 25, 2011 Posted June 25, 2011 Ok, Then I dont understand you, a mouse move moves the mouse, thats all it does. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Developers Jos Posted June 25, 2011 Developers Posted June 25, 2011 On 6/25/2011 at 12:09 PM, 'JohnOne said: Ok, Then I dont understand you, a mouse move moves the mouse, thats all it does.The whole problem is that part of the information is hidden in the topic title. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
VeryUniqueUsername Posted June 25, 2011 Author Posted June 25, 2011 Should I understand developers words as it is impossible with AutoIt, and I have to continue my searches?
JohnOne Posted June 25, 2011 Posted June 25, 2011 I must have drank my coffee from the silly cup this morning Jos, cause I still dont get it Unless OP is meaning the cursor maybe. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
JohnOne Posted June 25, 2011 Posted June 25, 2011 On 6/25/2011 at 12:24 PM, 'VeryUniqueUsername said: Should I understand developers words as it is impossible with AutoIt, and I have to continue my searches?Understand them however you wish, but you could try explaining your need a little more clearly.I'm not the worlds greatest interpreter but I cannot be alone here. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
VeryUniqueUsername Posted June 25, 2011 Author Posted June 25, 2011 On 6/25/2011 at 12:25 PM, 'JohnOne said: I must have drank my coffee from the silly cup this morning Jos, cause I still dont get it Unless OP is meaning the cursor maybe.I'll try to explain it other way: I need to send a some kind of an event, that will tell the background (not active) process/window information that mouse was moved, so the program can react on it.
JohnOne Posted June 25, 2011 Posted June 25, 2011 Iknow very little about this function but maybe its possible with the _SendMessage() function, perhaps the wm_mousemove message, I'm not csetain. I know ControlClick can often work on an inactive window. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
GEOSoft Posted June 25, 2011 Posted June 25, 2011 Try to understand this as you follow the concept.Lets just say you have 3 windows open Window A and Window B and Window C. It makes no difference at all which window is on top and active because the Mouse is in a layer above all of those. The Mouse cursor is always above all windows. and I think what you are wanting to do is a click-through action. That has nothing what so ever to do with moving the mouse. MouseMove() will do exactly as the function name suggests, it will MOVE the mouse with absolutely no regard for whatever windows are under it.Now if you are talking about clicking something with the mouse; then it becomes a different story but only up to a point. The window directly below the given mouse position is the window that will be acted on which may not be the top window at all. It might just be an empty spot on the desktop or some other place.Now, if you are looking to perform a mouse button action on another Window; you should be delving into the help file and looking at the Window Management >> Controls section to see the functions that are available to you there; some of which will work on a non-active window.I have seen apps that did allow a click-through action but none using AutoIt code and they were always apps that were A) small Windows and had a transparency ability.I have one installed on my wifes computer as a matter of fact but I've never had enough interest to even look to see what language it was written in on top of which the click-through option very quickly became a pain in the a55 so I disabled it. George Reveal hidden contents 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!"
VeryUniqueUsername Posted June 25, 2011 Author Posted June 25, 2011 Sad, but I don't need to click at all. I'll try to explain it again, with example for now. Let's say we have some shooter game, and we need to turn character to the left or to the right for strict 50px, and we want to do it automatically while working or doing other stuff.
guinness Posted June 25, 2011 Posted June 25, 2011 Wow, you need to read the Forum rules >> http://www.autoitscript.com/forum/forum-2/announcement-13-forum-rules/ UDF List: Reveal hidden contents _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
VeryUniqueUsername Posted June 25, 2011 Author Posted June 25, 2011 (edited) I said "for example" I don't know how to explain more informative due to lack of language knowledge, if people don't understand. Soft requires precise mouse movement to work, what can I do. If I'd need something for gaming there is a lot of other stuff to use. Edited June 25, 2011 by VeryUniqueUsername
JohnOne Posted June 25, 2011 Posted June 25, 2011 Perhaps if you tell us the software you are working with, it will give a better idea of what you are trying to do. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
GEOSoft Posted June 25, 2011 Posted June 25, 2011 Simple answer is in the explaination I posted above. The functionality you want is not limited by AutoIt, it is limited by Windows. George Reveal hidden contents 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!"
VeryUniqueUsername Posted June 25, 2011 Author Posted June 25, 2011 On 6/25/2011 at 2:06 PM, 'GEOSoft said: Simple answer is in the explaination I posted above. The functionality you want is not limited by AutoIt, it is limited by Windows.Thanks, that's all I need to know.
JohnOne Posted June 25, 2011 Posted June 25, 2011 But there is more than one way to skin a cat. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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