Vill bli av med formatering

LordDante
P22
Medlem
Online

10 april 2014 11:24 | #1 LordDante

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">#SingleInstance Force </pre>
; Personal preference

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
#NoTrayIcon </pre>
; Personal preference

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;"> </pre>
; Initialize variables

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
X := 0
Y := 0
W := </pre>
A_ScreenWidth

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
H := </pre>
A_ScreenHeight

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;"> </pre>
return

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">

#w::
</pre>
WinGet

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">, window, ID, A </pre>
; Use the ID of the active window.

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
Toggle_Window(window)</pre>
return

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">

!^w::
</pre>
MouseGetPos

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">,,, window </pre>
; Use the ID of the window under the Mouse.

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
Toggle_Window(window)</pre>
return

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">

Toggle_Window(window)
{
</pre>
global

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;"> X, Y, W, H </pre>
; Since Toggle_Window() is a function, set Up X, Y, W, and H as globals

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
WinGet

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">, S, Style, % "ahk_id " window </pre>
; Get the style of the window

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
If (S & +0x840000) </pre>
; if not borderless

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
{
</pre>
WinGetPos

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">, X, Y, W, H, % "ahk_id " window </pre>
; Store window size/location

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
XMed := (2* X + W) / 2 </pre>
; Find the middle of the window

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
YMed := (2* Y + H) / 2 </pre>
; Find the middle of the window

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
; We check to see if the current window is outside of the default monitor.

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
; If it is, we increment our multiplier and try the next window (in all 4 directions).

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
; NOTE: This won't work for multi-monitor setups with different resolutions.

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
Loop

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
{
</pre>
if

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">(XMed > A_ScreenWidth * A_Index || XMed < </pre>
A_ScreenWidth

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;"> * (-1 * </pre>
A_Index

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">))
</pre>
continue

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
if

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">(XMed > </pre>
A_ScreenWidth

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;"> * (</pre>
A_Index

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;"> - 1))
XPos := (</pre>
A_Index

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;"> - 1) * </pre>
A_ScreenWidth

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
else

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
XPos := (-1 * </pre>
A_Index

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">) * </pre>
A_ScreenWidth

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
break

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
}
</pre>
Loop

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
{
</pre>
if

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">(YMed > A_ScreenHeight * A_Index || YMed < </pre>
A_ScreenHeight

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;"> * (-1 * </pre>
A_Index

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">))
</pre>
continue

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
if

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">(YMed > </pre>
A_ScreenWidth

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;"> * (</pre>
A_Index

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;"> - 1))
YPos := (</pre>
A_Index

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;"> - 1) * </pre>
A_ScreenHeight

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
else

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
YPos := (-1 * </pre>
A_Index

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">) * </pre>
A_ScreenHeight

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
break

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
}
</pre>
WinSet

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">, Style, -0x840000, % "ahk_id " window </pre>
; Remove borders

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
WinMove

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">, % "ahk_id " window,, %XPos%, %YPos%, %</pre>
A_ScreenWidth

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">%, %</pre>
A_ScreenHeight

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">% </pre>
; Stretch to Screen-size

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
return

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
}
If (S & -0x840000) </pre>
; if borderless

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
{
</pre>
WinSet

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">, Style, +0x840000, % "ahk_id " window </pre>
; Reapply borders

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
WinMove

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">, % "ahk_id " window,, X, Y, W, H </pre>
; return to original position

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
</pre>
return

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
}
Return </pre>
; return if the other if's don't fire (shouldn't be possible in most cases)

<pre class="lang-auto linenums:0 codebox" style="padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: Consolas, 'Liberation Mono', Courier, monospace; border-image: initial; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; max-height: 16em; overflow-x: auto; overflow-y: auto; color: #555555; font-size: 14px; line-height: 25.200000762939453px; border-width: 1px; border-color: #dddddd; border-style: solid; margin: 1em;">
}</pre>


testar igen,,


Skriva inlägg?

Logga in för att svara i tråden.