newbie210 Posted February 14, 2010 Share Posted February 14, 2010 I have scripts that worked on Windows XP no longer work on Windows7. Scripts may work inadvertently, like one time in 10. The functions that seem be be effected include: MouseClick MouseClickDrag MouseDown _WinAPI_Mouse_Event For example, the following code resizes a windows, by clicking and dragging the bottom corner : Opt("MustDeclareVars",1) dim $testTitle="some window title" dim $winPos = WinGetPos($testTitle) dim $newWidth = 710 MouseClickDrag ( "left",$winpos[0]+$winPos[2]-5,$winpos[1]+$winPos[3]-5, _ $winpos[0]+$newWidth-5,$winpos[1]+$winPos[3]-5) This works fine on my Win XP computer, but not on my Windows 7 computer. On the windows 7 computer you see the mouse move, but no 'clicking' is taking place. I have tried several things but am at a lost to know why. Is there some way I can work around this problem? Link to comment Share on other sites More sharing options...
Beege Posted February 14, 2010 Share Posted February 14, 2010 I'm currently running windows 7 and just checked mouseclickdrag and it seems to be working ok for me. Are you sure its just not grabing the edge? You can try something simple like highlighting some text in a notepad, just to verify if or not the mouseclickdrag is the source of the problem. Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator Link to comment Share on other sites More sharing options...
GEOSoft Posted February 15, 2010 Share Posted February 15, 2010 (edited) This may also be the result of a problem that first appeared in Vista. Before you try it again, go to Control Panel >> Mouse. Click the Pointers tab, set the scheme from Windows Aero to None and see if that helps. You can always change it back later. Edit: I should add that I've noticed that this particular issue is more noticable in Win 7 than it was in Vista and it doesn't apply to only AutoIt scripts. Edited February 15, 2010 by GEOSoft 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...
GEOSoft Posted February 15, 2010 Share Posted February 15, 2010 (edited) No, it didn't fix the script, it just proved what the problem is. With Aero enabled the mouse shows as being in a different position which is normally high and to the right of it's true location. The solution is to add a few pixels to the Y coordinate and to subtract a few from the X coordinate. 3 or 4 will probably do it but please let us know what number you come up with. Also please cancel the bug report you made. You should have waited for an answer before jumping to the conclusion that AutoIt was wrong when in fact it's a Windows problem. Edit. Just thinking about this some more. When you reply with the offsets you used, please also post your screen resolution. The offset will be affected by that so we can't use a particular given number here. Edited February 15, 2010 by GEOSoft 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...
Administrators Jon Posted February 15, 2010 Administrators Share Posted February 15, 2010 I have Aero theme enabled and I don't get this behavior... The mouse coords are from the "hot spot" of the mouse regardless of what it looks like on screen. So why is this working for everyone else except the OP? Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
GEOSoft Posted February 15, 2010 Share Posted February 15, 2010 I have Aero theme enabled and I don't get this behavior... The mouse coords are from the "hot spot" of the mouse regardless of what it looks like on screen. So why is this working for everyone else except the OP?Are you using a custom scheme for mouse pointers? There is an individual setting for them in Control Panel >>Mouse and that is the one that causes the problems. Like I pointed out it is also resolution dependent. I first noticed it at 1680 x 1050 when I couldn't even grap the edge of a window to resize unless I moved the mouse just slightly off position and I had to go and research the issue. I found a lot of people with the same problem going way back to the original Vista release.. I think that the mouse shadows shift the hot spot just enough that you can't grab it at the point where you think it is. As the OP has stated, setting the Mouse Pointer Scheme to "None" solved his problem. 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...
Administrators Jon Posted February 15, 2010 Administrators Share Posted February 15, 2010 No matter what scheme I choose, the hotspot is always exactly where I think it should be... Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 15, 2010 Moderators Share Posted February 15, 2010 George,I have just checked my Vista <Mouse Properties> and I too have the <Pointers> set to <Windows Aero (system scheme)> - which it must be by default as I have never even looked there before!. Like Jon, I have never had a problem with the hotspot - it has always been where I thought it should be. MouseGetPos has always returned what I thought it should in a number of screen magnification scripts.Must be your proximity to the magnetic pole..... M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
GEOSoft Posted February 15, 2010 Share Posted February 15, 2010 Well, it worked for the OP so all I can think of is the possible difference in Resolution. I know I had the same problem (at high resolution) when physically using the mouse and making that change solved the problem. What I am certain of is the fact it's NOT an AutoIt bug. AI can't do more than what Windows will allow it to do. @M23 Yes, Windows Aero is the default scheme. 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...
newbie210 Posted March 16, 2010 Author Share Posted March 16, 2010 (edited) This fixed the problem, thank you for your help...Well it was fixed... but only for 5 minutes.I don't think the "hot stop" is the problem, but the fact no "click" is being sent at all. Or the sent click is getting lost.I don't know enough about how auto-it, or windows 7 works to know why.Thanks for your help if you have any.Could it be I used a 'free upgrade from vista to win7' that came with my computer.Rather than purchasing win 7? Could it be some other windows settings?I'm using 2560x1600 and 1920x1200 dual monitor, if that makes a difference? Edited March 16, 2010 by newbie210 Link to comment Share on other sites More sharing options...
newbie210 Posted March 16, 2010 Author Share Posted March 16, 2010 Well it was fixed... but only for 5 minutes.I don't think the "hot stop" is the problem, but the fact no "click" is being sent at all. Or the sent click is getting lost.I don't know enough about how auto-it, or windows 7 works to know why.Thanks for your help if you have any.Could it be I used a 'free upgrade from vista to win7' that came with my computer.Rather than purchasing win 7? Could it be some other windows settings?I'm using 2560x1600 and 1920x1200 dual monitor, if that makes a difference?And every thing is working fine again..... I don't know why, maybe the lastest windows update changed something?????Sorry and thanks Link to comment Share on other sites More sharing options...
GEOSoft Posted March 16, 2010 Share Posted March 16, 2010 And every thing is working fine again..... I don't know why, maybe the lastest windows update changed something?????Sorry and thanksI checked today and my current information is that MS did indeed release a patch for that issue in a recent update although not the last one. That could be why it was working fine for others but I'm not thoroughly convinced yet. 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...
newbie210 Posted March 16, 2010 Author Share Posted March 16, 2010 I did find one solution to my problem... I found that auto-it was unable to automate some programs, this was because it did not have the correct privileges to do so. Clicking "Run as administrator..." when running the script fixed this issue. I believe "clicks" were not being sent to programs that auto-it did not have the correct privileges to automate, simple as that. The easiest way to ensure that the script is running as an administrator is: 1) compile your script to exe 2) in the properties window on the exe file, go on the compatibility tab, and check "Run this program as an administrator" Link to comment Share on other sites More sharing options...
GEOSoft Posted March 17, 2010 Share Posted March 17, 2010 Try adding #RequireAdmin to the top of the script. 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...
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