talolike Posted November 12, 2018 Posted November 12, 2018 Hey, im new in Autoit and i dont understand how i can work with „negative“ (-) numbers in a window can anyone explain that?
Moderators JLogan3o13 Posted November 12, 2018 Moderators Posted November 12, 2018 @talolike welcome to the forum. Please be more specific; "work with negative numbers in a window" can mean a million different things. Please see the post below for what we need to best help you: https://www.autoitscript.com/forum/topic/110993-faq-updated-please-read-before-posting/?do=findComment&comment=1405467 "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!
talolike Posted November 12, 2018 Author Posted November 12, 2018 27 minutes ago, JLogan3o13 said: @talolike welcome to the forum. Please be more specific; "work with negative numbers in a window" can mean a million different things. Please see the post below for what we need to best help you: https://www.autoitscript.com/forum/topic/110993-faq-updated-please-read-before-posting/?do=findComment&comment=1405467 expandcollapse popupFunc DetectFullscreenToWindowedOffset($hTitle) ; Returns $Offset[4] left, top, right, bottom (Fullscreen returns 0, 0, Width, Height) Local $x1, $x2, $y1, $y2 Local $Offset[4] Local $ClientZero[4] = [0, 0, 0, 0] WinActivate($hTitle) WinWaitActive($hTitle, "", 5) WinActivate($hTitle) Local $Client = WinGetPos($hTitle) If Not IsArray($Client) Then SetGUIStatus("E: ClientSize could not be detected") Return ($ClientZero) EndIf If $Client[2] = @DesktopWidth And $Client[3] = @DesktopHeight Then SetGUIStatus("Fullscreen detected (" & $Client[2] & "x" & $Client[3] & ") - No Offsets") Return ($Client) EndIf If Not VisibleCursor() Then CoSe("{LCTRL}") Opt("MouseCoordMode", 2) MouseMove(0, 0, 0) Opt("MouseCoordMode", 1) $x1 = MouseGetPos(0) $y1 = MouseGetPos(1) Opt("MouseCoordMode", 0) MouseMove(0, 0, 0) Opt("MouseCoordMode", 1) $x2 = MouseGetPos(0) $y2 = MouseGetPos(1) MouseMove($x1, $y1, 0) $Offset[0] = $Client[0] + $x1 - $x2 $Offset[1] = $Client[1] + $y1 - $y2 $Offset[2] = $Client[0] + $Client[2] $Offset[3] = $Client[1] + $Client[3] For $i = 0 To 3 SetGUIStatus("ScreenOffset(" & $i & "): " & $Offset[$i]) So like this after then the $Array is searching for Local Const $Offset[2] = [-1, 130] and now what i dont can understand is how can be possible to find out negativ numbers in a window?
Moderators JLogan3o13 Posted November 12, 2018 Moderators Posted November 12, 2018 Out of curiosity, how is this script any different from your last? ***In case you missed it, this is a Mod stepping into a thread*** "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!
talolike Posted November 12, 2018 Author Posted November 12, 2018 5 minutes ago, JLogan3o13 said: Out of curiosity, how is this script any different from your last? ***In case you missed it, this is a Mod stepping into a thread*** what you mean?
Moderators JLogan3o13 Posted November 12, 2018 Moderators Posted November 12, 2018 I mean it looks like the same question, where you are looking for x y coords on a gamebot. "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!
talolike Posted November 12, 2018 Author Posted November 12, 2018 Just now, JLogan3o13 said: I mean it looks like the same question, where you are looking for x y coords on a gamebot. no im not rlly interessted on that that was only an exmaple.. i want only understand how that works with negative coordinates not for BOTs!
Moderators JLogan3o13 Posted November 12, 2018 Moderators Posted November 12, 2018 So what exactly are you trying to automate then (and please let's skip the whole "I'm only trying to learn, no specific application" excuse). The more information you provide us the better we are able to assist. "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!
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