HankHell Posted February 4, 2018 Posted February 4, 2018 (edited) I'm trying to mathematically represent the center of each quadrant, regardless of screen resolution; as in my example: Current x= and y= are based off of 1920x1080 resolution of course (yes I know @DesktopHeight / 4 works too) Edited February 4, 2018 by HankHell
gillesg Posted February 4, 2018 Posted February 4, 2018 Quadrant 1 : @desktopWidth/4 , @DesktopHeight/4 Quadrant 2 : 3 * @desktopWidth/4 , @DesktopHeight/4 Quadrant 3 : @desktopWidth/4 , 3 * @DesktopHeight/4 Quadrant 4 : 3 * @desktopWidth/4 , 3 * @DesktopHeight/4 HankHell 1
HankHell Posted February 4, 2018 Author Posted February 4, 2018 On 2/4/2018 at 6:51 AM, gillesg said: Quadrant 1 : @desktopWidth/4 , @DesktopHeight/4 Quadrant 2 : 3 * @desktopWidth/4 , @DesktopHeight/4 Quadrant 3 : @desktopWidth/4 , 3 * @DesktopHeight/4 Quadrant 4 : 3 * @desktopWidth/4 , 3 * @DesktopHeight/4 Expand I kept wanting to address it as an even integer
Developers Jos Posted February 4, 2018 Developers Posted February 4, 2018 (edited) On 2/4/2018 at 7:23 AM, HankHell said: I kept wanting to address it as an even integer Expand Meaning what exactly? Which event? On 2/4/2018 at 7:59 AM, HankHell said: Assign("Hankhell", "Stupid") Expand Is this a new form of trying to get attention or bumping? Jos Edited February 4, 2018 by Jos 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.
HankHell Posted February 4, 2018 Author Posted February 4, 2018 On 2/4/2018 at 8:33 AM, Jos said: Meaning what exactly? Which event? Is this a new form of trying to get attention or bumping? JOs Expand no, just trying to add little humor. I was trying to address 1/4th of the screen instead of 1/3rd. I don't know why you mods seem to pick on me after my .bat post, the question has been solved thanks a bunch to @gillesg
HankHell Posted February 4, 2018 Author Posted February 4, 2018 (edited) Problem Solved: Quote expandcollapse popup#include <MsgBoxConstants.au3> HotKeySet("{F1}", "GetMpos") ;press F1 to get your current mouse position HotKeySet("{F2}", "FindCenter") ;F2 HotKeySet("{F3}", "FindCenterLeft") ;F3 HotKeySet("{F4}", "FindCenterRight") ;F4 HotKeySet("{F5}", "FindTopCenter") ;F5 HotKeySet("{F6}", "FindBottomCenter") ;F6 HotKeySet("{F7}", "FindTopLeftCorner") ;F7 HotKeySet("{F8}", "FindTopRightCorner") ;F8 HotKeySet("{F9}", "FindBottomLeftCorner") ;F9 HotKeySet("{F10}", "FindBottomRightCorner") ;F10 HotKeySet("{1}", "FindQ1") ;1 HotKeySet("{2}", "FindQ2") ;2 HotKeySet("{3}", "FindQ3") ;3 HotKeySet("{4}", "FindQ4") ;4 ;HotKeySet("{5}", "FindBetweenQ1Q2Center") ;5 ;HotKeySet("{6}", "FindBetweenQ1Q3Center") ;6 ;HotKeySet("{7}", "FindBetweenQ2Q4Center") ;7 HotKeySet("{8}", "FindBetweenQ3Q4Center") ;8 HotKeySet("{ESC}", "End") ;ESC to close the program While 1 Sleep(100) WEnd Func GetMpos() $Mpos = MouseGetPos() $Mpos_x = $Mpos[0] $Mpos_y = $Mpos[1] Msgbox($MB_SYSTEMMODAL,"Mouse Coords", "x=" & $Mpos_x & " " & "y=" & $Mpos_y) EndFunc Func FindCenter() MouseMove((@DesktopWidth / 2), (@DesktopHeight / 2), 0) GetMpos() EndFunc Func FindCenterLeft() MouseMove(0, (@DesktopHeight / 2), 0) GetMpos() EndFunc Func FindCenterRight() MouseMove(@DesktopWidth, (@DesktopHeight / 2), 0) GetMpos() EndFunc Func FindTopCenter() MouseMove((@DesktopWidth / 2), 0, 0) GetMpos() EndFunc Func FindBottomCenter() MouseMove((@DesktopWidth / 2), @DesktopHeight, 0) GetMpos() EndFunc Func FindBottomRightCorner() MouseMove(@DesktopWidth, @DesktopHeight, 0) GetMpos() EndFunc Func FindTopRightCorner() MouseMove(@DesktopWidth, 0, 0) GetMpos() EndFunc Func FindBottomLeftCorner() MouseMove(0, @DesktopHeight, 0) GetMpos() EndFunc Func FindTopLeftCorner() MouseMove(0, 0, 0) GetMpos() EndFunc Func FindQ1() MouseMove((@DesktopWidth / 4), (@DesktopHeight / 4), 0) GetMpos() EndFunc Func FindQ2() MouseMove ((3 * @DesktopWidth / 4), (@DesktopHeight / 4), 0) GetMpos() EndFunc Func FindQ3() MouseMove ((@DesktopWidth / 4), (3 * @DesktopHeight / 4), 0) GetMpos() EndFunc Func FindQ4() MouseMove ((3 * @DesktopWidth / 4), (3 * @DesktopHeight / 4), 0) GetMpos() EndFunc Func FindBetweenQ3Q4Center();Between quadrant 3 and quadrant 4 Center MouseMove(@DesktopWidth / 2, ((@DesktopHeight /2) + (@DesktopHeight /4)), 0) GetMpos() EndFunc Func End() Exit EndFunc Expand will clean code up later Edited February 4, 2018 by HankHell
Developers Jos Posted February 4, 2018 Developers Posted February 4, 2018 (edited) On 2/4/2018 at 9:06 AM, HankHell said: I don't know why you mods seem to pick on me after my .bat post, Expand we don't pick on people unless they ask for it, like you did here! .. and the first line in that post was actually a sincere question as you did not define what event you were referring to. Whatever.... Jos Edited February 4, 2018 by Jos 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.
HankHell Posted February 4, 2018 Author Posted February 4, 2018 (edited) On 2/4/2018 at 10:49 AM, Jos said: we don't pick on people unless they ask for it, like you did here! .. and the first line in that post was actually a sincere question as you did not define what event you were referring to. Whatever.... Jos Expand that's not cool though, you shouldn't pick on forums members if you want to support your language (or fourms). You mods are extremely rude to members that want to support the community, and to those that ask for help. just simply because you are a developer means you know more about the language than anyone else just diving into it (like I did) that doesn't mean you should poke fun at others for not knowing as much as you do. I have helped several fourm members already, and I still get treated this way. <code updated> Edited February 4, 2018 by HankHell
Developers Jos Posted February 4, 2018 Developers Posted February 4, 2018 What isn't cool, us picking on people that ask for it? You are kidding right? Stop asking for it and blend in is what I would suggest and you see we will be pretty helpful. Jos 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.
HankHell Posted February 4, 2018 Author Posted February 4, 2018 On 2/4/2018 at 11:14 AM, Jos said: What isn't cool, us picking on people that ask for it? You are kidding right? Stop asking for it and blend in is what I would suggest and you see we will be pretty helpful. Jos Expand how is helping forums member and contributing to the website not "blending in" dude jos, you are the worst mods I've ever seen on any fourm. and yet I still contribute and update my code for others to enjoy.
Somerset Posted February 4, 2018 Posted February 4, 2018 Stop! Opinionated aversions do not go over well.
HankHell Posted February 4, 2018 Author Posted February 4, 2018 (edited) On 2/4/2018 at 11:32 AM, Somerset said: Stop! Opinionated aversions do not go over well. Expand it's not opinionated, it's 100% the truth, however this is getting off topic now. my point is that I've made 44 other posts since then, and the mods gonna hold me against the 3rd and 4th posts? really sucks that I get trolled because of me wanting to share something with the community Edited February 4, 2018 by HankHell
UEZ Posted February 4, 2018 Posted February 4, 2018 Global $aResult = FindCenterRectangle(0, 0, @DesktopWidth, @DesktopHeight) ConsoleWrite("Center x: " & $aResult[0] & @CRLF) ConsoleWrite("Center y: " & $aResult[1] & @CRLF) Func FindCenterRectangle($fX1, $fY1, $fX2, $fY2) ;x1,y1 left upper coordinate, x2,y2 right bottom coordinate Local $iW = $fX2 - $fX1, $iH = $fY2 - $fY1 Local $aCoordinate[2] = [$fX1 + $iW / 2, $fY1 + $iH / 2] Return $aCoordinate EndFunc Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Developers Jos Posted February 4, 2018 Developers Posted February 4, 2018 On 2/4/2018 at 11:34 AM, HankHell said: it's not opinionated, it's 100% the truth, however this is getting off topic now. my point is that I've made 44 other posts since then, and the mods gonna hold me against the 3rd and 4th posts? really sucks that I get trolled because of me wanting to share something with the community Expand I actually didn't remember but see now how right I was in that last post... fuck it. Jos JLogan3o13 1 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.
Recommended Posts