Jump to content

Recommended Posts

Posted

Thanks. Did you find a fix for your issue? Or just where the code was situated?

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

I am very close.

EDIT:

Already partially fixed.
Further work is in progress.
Edited by mlipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Because my plan was to fix this on the weekend.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

wait

another moment, maybe a few hours.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

OK, well this is much appreciated and saves me a ton of testing. I feel a little guilty now.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)
Reading your code is a good way of learning.
For now, EDIT: I'm trying to understand your way of writing code.
Therefore, as long it takes me.
 
btw.
look for my "Member title"
Edited by mlipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Well that's good to hear. -_0

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

Func _DockToWindow($hWnd_1, $hWnd_2, ByRef $iWindowPos_1, ByRef $iWindowPos_2, $fRightSide = True, $hActivate = 0)
    Local Const $aSciTEJump_Window = WinGetPos($hWnd_2)
    Local $aSciTE_Window = WinGetPos($hWnd_1)
    If UBound($aSciTE_Window) = 0 Or UBound($aSciTEJump_Window) = 0 Then
        Return SetError(1, 0, False)
    EndIf
    Local $iPos_1 = 0, $iPos_2 = 0
    For $i = 0 To 3
        $iPos_1 += $aSciTE_Window[$i] * $i
        $iPos_2 += $aSciTEJump_Window[$i] * $i
    Next

    If $iWindowPos_1 = $iPos_1 And $iWindowPos_2 = $iPos_2 Then
        Return SetError(2, 0, True)
    EndIf
    $iWindowPos_1 = $iPos_1
    $iWindowPos_2 = $iPos_2

    Local Enum $eDockLeft, $eDockTop, $eDockWidth, $eDockHeight
    Local Const $aDesktop_Window = _GetDesktopArea()

    Local Const $fIsMaximized = _IsMaximized($hWnd_1)
    If $fRightSide = Default Then
        $fRightSide = $aSciTEJump_Window[$eDockLeft] + $aSciTEJump_Window[$eDockWidth] > $aDesktop_Window[$eDockLeft] + $aSciTE_Window[$eDockLeft] + ($aSciTE_Window[$eDockWidth] / 2)
    EndIf
    If $fRightSide Then
        If $aSciTE_Window[$eDockLeft] + $aSciTE_Window[$eDockWidth] + $aSciTEJump_Window[$eDockWidth] > $aDesktop_Window[$eDockWidth] Then
            If $fIsMaximized Then
                $aSciTE_Window[$eDockLeft] = $aDesktop_Window[$eDockLeft]
                $aSciTE_Window[$eDockTop] = $aDesktop_Window[$eDockTop]
                $aSciTE_Window[$eDockWidth] = ($aDesktop_Window[$eDockWidth] - $aDesktop_Window[$eDockLeft]) - ($aSciTEJump_Window[$eDockWidth] - $aDesktop_Window[$eDockLeft])
                $aSciTE_Window[$eDockHeight] = ($aDesktop_Window[$eDockHeight] + $aDesktop_Window[$eDockTop]) - $aDesktop_Window[$eDockTop]
            Else
                $aSciTE_Window[$eDockLeft] = $aDesktop_Window[$eDockLeft] + $aDesktop_Window[$eDockWidth] - $aSciTE_Window[$eDockWidth] - $aSciTEJump_Window[$eDockWidth]
                Do
                    $aSciTE_Window[$eDockWidth] -= 1
                Until $aSciTE_Window[$eDockLeft] + $aSciTE_Window[$eDockWidth] + $aSciTEJump_Window[$eDockWidth] < $aDesktop_Window[$eDockWidth] + $aDesktop_Window[$eDockLeft]
            EndIf
            WinMove($hWnd_1, '', $aSciTE_Window[$eDockLeft], $aSciTE_Window[$eDockTop], $aSciTE_Window[$eDockWidth], $aSciTE_Window[$eDockHeight])
        EndIf
    Else
        If $aSciTE_Window[$eDockLeft] > $aDesktop_Window[$eDockLeft] Then
            ; TODO ;)
        Else
            If $fIsMaximized Then
                $aSciTE_Window[$eDockLeft] = $aDesktop_Window[$eDockLeft] + $aSciTEJump_Window[$eDockWidth]
                $aSciTE_Window[$eDockTop] = $aDesktop_Window[$eDockTop]
                $aSciTE_Window[$eDockWidth] = ($aDesktop_Window[$eDockWidth] - $aDesktop_Window[$eDockLeft]) - ($aSciTEJump_Window[$eDockWidth] - $aDesktop_Window[$eDockLeft])
                $aSciTE_Window[$eDockHeight] = ($aDesktop_Window[$eDockHeight] + $aDesktop_Window[$eDockTop]) - $aDesktop_Window[$eDockTop]
            Else
                $aSciTE_Window[$eDockLeft] = $aDesktop_Window[$eDockLeft] + $aSciTEJump_Window[$eDockWidth]
                Do
                    $aSciTE_Window[$eDockWidth] -= 1
                Until $aSciTE_Window[$eDockLeft] + $aSciTE_Window[$eDockWidth] < $aDesktop_Window[$eDockWidth]
            EndIf
        EndIf
        WinMove($hWnd_1, '', $aSciTE_Window[$eDockLeft], $aSciTE_Window[$eDockTop], $aSciTE_Window[$eDockWidth], $aSciTE_Window[$eDockHeight])
    EndIf
    If $fRightSide Then
        $aSciTE_Window[$eDockLeft] += $aSciTE_Window[$eDockWidth]
    Else
        $aSciTE_Window[$eDockLeft] -= $aSciTEJump_Window[$eDockWidth]
    EndIf
    WinMove($hWnd_2, '', $aSciTE_Window[$eDockLeft], $aSciTE_Window[$eDockTop], Default, $aSciTE_Window[$eDockHeight])

    If IsHWnd($hActivate) Then
        WinActivate($hActivate)
    EndIf
    Return True
EndFunc   ;==>_DockToWindow
 

I made some change ;)

EDIT:

I forgot about

$aSciTE_Window[$eDockLeft] -= $aSciTEJump_Window[$eDockWidth]
Edited by mlipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
I found one problem that I do not know how to solve.
 
Description:
Place SciTe.exe window on the left side of the desktop, but it would not be maximized.
Dock SciTeJump the right edge.
Grab and drag the title SciTe.exe
 
What I noticed:
SciTeJump does not move at the same time, the offset SciTe.exe

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Thanks for the changes, but they seem to produce other problems than expected. This is the code I used to test the dock to window code. It's basically stripped out of SciTE Jump. Oh, and I changed the variable $aReturn to $aDesktop_Window as it made more sense. Thanks.

#include <APIConstants.au3>
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>

If ProcessExists('SciTE.exe') = 0 Then
    Exit MsgBox($MB_SYSTEMMODAL, '', 'Please start SciTE.exe')
EndIf
Example()

Func Example()
    ; Create a GUI, similar to SciTE Jump's GUI.
    Local Const $hGUI = GUICreate('', 215, 400, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX))
    GUISetState(@SW_SHOW, $hGUI)

    Local $sStyleEx = -1, $vDummyValue = GUIGetStyle($hGUI)
    If UBound($vDummyValue) Then
        ; $sStyle = $vDummyValue[0]
        $sStyleEx = $vDummyValue[1]
    EndIf
    $vDummyValue = 0

    GUISetStyle(BitOR($WS_POPUPWINDOW, $WS_SIZEBOX), $sStyleEx, $hGUI)
    _WinAPI_SetWindowPos($hGUI, 0, 0, 0, 0, 0, BitOR($SWP_NOMOVE, $SWP_NOSIZE, $SWP_NOZORDER, $SWP_FRAMECHANGED))


    Local Const $hSciTE = WinGetHandle('[CLASS:SciTEWindow]')
    Local $iPos_1 = 0, $iPos_2 = 0
    While 1
        ; Dock the first window to the left or right.
        _DockToWindow($hSciTE, $hGUI, $iPos_1, $iPos_2, Default)

        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd

    GUIDelete($hGUI)
EndFunc   ;==>Example

Func _DockToWindow($hWnd_1, $hWnd_2, ByRef $iWindowPos_1, ByRef $iWindowPos_2, $fRightSide = True, $hActivate = 0)
    Local Const $aSciTEJump_Window = WinGetPos($hWnd_2)
    Local $aSciTE_Window = WinGetPos($hWnd_1)

    If UBound($aSciTE_Window) = 0 Or UBound($aSciTEJump_Window) = 0 Then
        Return SetError(1, 0, False)
    EndIf
    Local $iPos_1 = 0, $iPos_2 = 0
    For $i = 0 To 3
        $iPos_1 += $aSciTE_Window[$i] * $i
        $iPos_2 += $aSciTEJump_Window[$i] * $i
    Next

    If $iWindowPos_1 = $iPos_1 And $iWindowPos_2 = $iPos_2 Then
        Return SetError(2, 0, True)
    EndIf
    $iWindowPos_1 = $iPos_1
    $iWindowPos_2 = $iPos_2

    Local Enum $eDockLeft, $eDockTop, $eDockWidth, $eDockHeight
    Local Const $aDesktop_Window = _GetDesktopArea()

    Local Const $fIsMaximized = _IsMaximized($hWnd_1)
    If $fRightSide = Default Then
        $fRightSide = $aSciTEJump_Window[$eDockLeft] + $aSciTEJump_Window[$eDockWidth] > $aDesktop_Window[$eDockLeft] + $aSciTE_Window[$eDockLeft] + ($aSciTE_Window[$eDockWidth] / 2)
    EndIf

    If $fRightSide Then
        If $aSciTE_Window[$eDockLeft] + $aSciTE_Window[$eDockWidth] + $aSciTEJump_Window[$eDockWidth] > $aDesktop_Window[$eDockWidth] Then
            If $fIsMaximized Then
                $aSciTE_Window[$eDockLeft] = $aDesktop_Window[$eDockLeft]
                $aSciTE_Window[$eDockTop] = $aDesktop_Window[$eDockTop]
                $aSciTE_Window[$eDockWidth] = ($aDesktop_Window[$eDockWidth] - $aDesktop_Window[$eDockLeft]) - ($aSciTEJump_Window[$eDockWidth] - $aDesktop_Window[$eDockLeft])
                $aSciTE_Window[$eDockHeight] = ($aDesktop_Window[$eDockHeight] + $aDesktop_Window[$eDockTop]) - $aDesktop_Window[$eDockTop]
            Else
                $aSciTE_Window[$eDockLeft] = $aDesktop_Window[$eDockWidth] - $aSciTE_Window[$eDockWidth] - $aSciTEJump_Window[$eDockWidth]
                Do
                    $aSciTE_Window[$eDockWidth] -= 1
                Until $aSciTE_Window[$eDockLeft] + $aSciTE_Window[$eDockWidth] + $aSciTEJump_Window[$eDockWidth] < $aDesktop_Window[$eDockWidth]
            EndIf
            WinMove($hWnd_1, '', $aSciTE_Window[$eDockLeft], $aSciTE_Window[$eDockTop], $aSciTE_Window[$eDockWidth], $aSciTE_Window[$eDockHeight])
        EndIf
    Else
        If $aSciTEJump_Window[$eDockLeft] < $aDesktop_Window[$eDockLeft] Then
            If $fIsMaximized Then
                $aSciTE_Window[$eDockLeft] = $aDesktop_Window[$eDockLeft] + $aSciTEJump_Window[$eDockWidth]
                $aSciTE_Window[$eDockTop] = $aDesktop_Window[$eDockTop]
                $aSciTE_Window[$eDockWidth] = ($aDesktop_Window[$eDockWidth] - $aDesktop_Window[$eDockLeft]) - ($aSciTEJump_Window[$eDockWidth] - $aDesktop_Window[$eDockLeft])
                $aSciTE_Window[$eDockHeight] = ($aDesktop_Window[$eDockHeight] + $aDesktop_Window[$eDockTop]) - $aDesktop_Window[$eDockTop]
            Else
                $aSciTE_Window[$eDockLeft] = $aDesktop_Window[$eDockLeft] + $aSciTEJump_Window[$eDockWidth]
                Do
                    $aSciTE_Window[$eDockWidth] -= 1
                Until $aSciTE_Window[$eDockLeft] + $aSciTE_Window[$eDockWidth] < $aDesktop_Window[$eDockWidth]
            EndIf
            WinMove($hWnd_1, '', $aSciTE_Window[$eDockLeft], $aSciTE_Window[$eDockTop], $aSciTE_Window[$eDockWidth], $aSciTE_Window[$eDockHeight])
        EndIf
    EndIf

    If $fRightSide Then
        $aSciTE_Window[$eDockLeft] += $aSciTE_Window[$eDockWidth]
    Else
        $aSciTE_Window[$eDockLeft] -= $aSciTEJump_Window[$eDockWidth]
    EndIf
    WinMove($hWnd_2, '', $aSciTE_Window[$eDockLeft], $aSciTE_Window[$eDockTop], Default, $aSciTE_Window[$eDockHeight])

    If IsHWnd($hActivate) Then
        WinActivate($hActivate)
    EndIf
    Return True
EndFunc   ;==>_DockToWindow

Func _GetDesktopArea()
    Local Const $tWorkArea = DllStructCreate($tagRECT)
    _WinAPI_SystemParametersInfo($SPI_GETWORKAREA, 0, DllStructGetPtr($tWorkArea))
    Local Const $aReturn[4] = [DllStructGetData($tWorkArea, 'Left'), DllStructGetData($tWorkArea, 'Top'), _
            DllStructGetData($tWorkArea, 'Right') - DllStructGetData($tWorkArea, 'Left'), DllStructGetData($tWorkArea, 'Bottom') - DllStructGetData($tWorkArea, 'Top')]
    Return $aReturn
EndFunc   ;==>_GetDesktopArea

Func _IsMaximized($hWnd)
    Return BitAND(WinGetState($hWnd), 32) = 32
EndFunc   ;==>_IsMaximized

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

There is currently only the option to expand one of the following either regions, functions or comments.

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

SciTE Jump V2.15 beta for those wishing to give it a try...

SciTE Jump v2.15.103.230.zip

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

Hello,
I have a idea for new feature .

I want that your tools will 

include a button which when clicked, tge list of functions  that are shown in your tool will be displayed in particular order

 

I can not explain it in one sentence because of my English.

I will try to show you an example -

Suppose your tool displays the following list of functions:
 

  Quote

cfunction

ffunction

afunction

lfunction

dfunction

afunction2

cfunction2

afunction

 

Imagine that this list is big.

i want an option that will arrange the list in the following way:
 

  Quote

afunction

afunction2

cfunction

cfunction2

dfunction

lfunction

 

This way, much easier to navigate through a huge list

I hope you understand ..
I think it's a great idea.

I would love if you do that!

Posted (edited)

Already available. Just select the setting to "sort functions the functions listed."

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

  On 11/16/2013 at 8:19 AM, guinness said:

Already available. Just select the setting to "sort functions the functions listed."

Thank you!!

Your tool does not stops surprising me

This option is very useful

Posted

No problem. There are quite a few hidden features that some may find surprising e.g. find in files.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

  • 2 weeks later...
Posted

Looking to releasing the next version this weekend, though depends on whether or not I can fix an issue reported by mlipok (need to assess if it's an issue).

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

REPRO CODE:
 

;TODO1
;;TODO2
;;;TODO3
;TODO4
;;TODO5
;;;TODO6
;TODO7
;;TODO8
;;;TODO9

Func Test()
;~  TODO

EndFunc   ;==>Test




;TODO1a
;;TODO2a
;;;TODO3a
;TODO4a
;;TODO5a
;;;TODO6a
;TODO7a
;;TODO8a
;;;TODO9a

try to jump to the various comments

in the order

 

;;;TODO9a
;;;TODO9
;;;TODO9a
;;;TODO9
;;;TODO9a
;;;TODO9
;;;TODO9a
;;;TODO9

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

another REPRO CODE:

;TODO1
;;TODO2
;;;TODO3
;TODO4
;;TODO5
;;;TODO6
;TODO7
;;TODO8
;;;TODO9
;;TODO9
;TODO9

Func Test()
;~  TODO
EndFunc   ;==>Test

;TODO1a
;;TODO2a
;;;TODO3a
;TODO4a
;;TODO5a
;;;TODO6a
;TODO7a
;;TODO8a
;;;TODO9a
;;TODO9a
;TODO9a
try to jump in that order:

;;;TODO9
;;TODO9
;TODO9
;;;TODO9a
;;TODO9a
;TODO9a
;;;TODO9
;;TODO9
;TODO9
;;TODO9
;;;TODO9
;;;TODO9a
;;TODO9a
;TODO9a
;;TODO9a
;;;TODO9a
;;TODO9a
;TODO9a
;;;TODO9
;;TODO9
;TODO9
;;TODO9
;;;TODO9
Edited by mlipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...