Jump to content

GUIExtender - Deprecated version


Melba23
 Share

Recommended Posts

Melba23

I love your extender but I found a bug with your UDF that mess up the layout when user switch shell style.

Is there a fix for this?

You can use any of your example have it open and change windows theme. all the section will go out of wack or blank out. Let me know how I can counter this.

Link to comment
Share on other sites

  • Moderators

Crayfish,

Have you tried minimizing and then restoring the GUI? When I change style that seems to solve the problem. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Melba23,

Sometime when windows refresh it trigger guiextender to move all control to hide leaving a gui with an empty blank out space. Yah I found out minimized and restore work but kinda odd to have to do that randomly when using GUI. It's only happen when there 2 or more sections. Changing style is my easiest way for you to trigger the glitch. Any other windows refresh or other application redraw can glitch out the position.

i.e. I can have my app open then I go to other apps minimize it and my app blank out randomly.

I was wonder what trigger it to lose the control position when your function seem to record it into array - It shouldn't change right?

Link to comment
Share on other sites

  • Moderators

Crayfish,

I am not that surprised that changing the Windows theme causes problems as the entire screen is redrawn, but as to:

i.e. I can have my app open then I go to other apps minimize it and my app blank out randomly

this is not something I have ever seen or ever had reported. :wacko:

Can you post the code of the GUI with which you have problems and explain in detail what I have to do to make it "glitch". :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Thank you Melba23 for looking into it.

CreateGUIFunction()

; Create the GUI
Func CreateGUIFunction()
Local $LabelID, $LabelPWD
Local $iInfo_Section_Start, $iInfo_Section_Height
Local $iMain_Section_Start, $iMain_Section_Height
Local $iMore_Section_Start, $iMore_Section_Height


$Main = GUICreate("My GUI", 346, 257)
GUISetOnEvent($GUI_EVENT_CLOSE, "On_Exit", $Main)

_GUIExtender_Init($Main, 0, 2)

;Group 1
$iMain_Section_Start = 0
$iMain_Section_Height = 50
$iMain_Section = _GUIExtender_Section_Start($Main, $iMain_Section_Start, $iMain_Section_Height)
_GUIExtender_Section_Action($Main, $iMain_Section)
GUICtrlCreateGroup("", 5, $iMain_Section_Start, 335, 46)

_GUIExtender_Section_End($Main) ;Group 1 End

;#########GROUP 2#############################################################
$iInfo_Section_Start = $iMain_Section_Start + $iMain_Section_Height
$iInfo_Section_Height = 127
$iInfo_Section = _GUIExtender_Section_Start($Main, $iInfo_Section_Start, $iInfo_Section_Height)
_GUIExtender_Section_Action($Main, $iInfo_Section)
GUICtrlCreateGroup("", 5, $iInfo_Section_Start + 5, 335, 119)

_GUIExtender_Section_End($Main)
;######################################################################


;Group 3
$iMore_Section_Start = $iInfo_Section_Start + $iInfo_Section_Height
$iMore_Section_Height = 80
$iMore_Section = _GUIExtender_Section_Start($Main, $iMore_Section_Start, $iMore_Section_Height)
_GUIExtender_Section_Action($Main, $iMore_Section)
GUICtrlCreateGroup("More", 5, $iMore_Section_Start, 336, 76)

_GUIExtender_Section_End($Main) ;Group 3 End

_GUIExtender_Section_Extend($Main, $iMain_Section, False)
_GUIExtender_Section_Extend($Main, $iMore_Section, False)

GUISetState(@SW_SHOW)

While 1
Sleep(10)
WEnd

EndFunc

Any suggestion would be appreciated.

Link to comment
Share on other sites

  • Moderators

Crayfish,

And what do I have to do to make it misbehave? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

LOL yah I was affraid you asked that hence I did a lot of self debug and stripped all code down to bare minimal and trigger everything to replicate the effect and the easiest way is to change style.

I suppose any app that do a screen refresh or redraw can trigger this.

Link to comment
Share on other sites

  • Moderators

Crayfish,

I have been playing around and I can certainly reproduce the problem when changing styles. It seems to be the same problem that happens when you run through a MINIMIZE/RESTORE cycle as I explained here. You have love Windows when it causes the GUI to be misdrawn when redrawn. :wacko:

The only thing I can think of at the moment to remedy this automatically would be to use a message handler to run the _GUIExtender_Restore function whenever the GUI is repainted. But I am loath to do that and so complicate the UDF. :(

What sort of apps are you using that need to redraw the screen and so provoke this problem? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

The process that causing the on screen stagger to refresh is a propriety bank software that have so many input boxes and fields and control lists. Everytime a new client open, it blank out my app randomly.

What my apps does it simply create new client input some name retrieve some name off the bank software.

I can send you the full code when I'm at home. Right now I'm at work watching your respond LOL.

Thanks melba23

Link to comment
Share on other sites

  • Moderators

Crayfish,

Perhaps you could call WinList every now and again via Adlib to check when if the bank app has opened a new window and if so force a MINIMIZE/RESTORE cycle of your GUI - that might be a possible workaround. ;)

M23

P.S. If it is not enough that they have screwed up the entire world economy, now the bloody banks are messing up my AutoIt UDFs! :mad:

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Crayfish,

Perhaps you could call WinList every now and again via Adlib to check when if the bank app has opened a new window and if so force a MINIMIZE/RESTORE cycle of your GUI - that might be a possible workaround. ;)

M23

P.S. If it is not enough that they have screwed up the entire world economy, now the bloody banks are messing up my AutoIt UDFs! :mad:

If I try to AdlibRegister force minimize/restore, it will create funny effect animation. I think ill disable this UDF for now. Gosh I love your UDF such a annoy glitch.

Link to comment
Share on other sites

  • Moderators

Crayfish,

Did you just force the cycle at regular intervals, or did you check for the "Everytime a new client open" and only cycle when that happened? I understood your comment to mean that the bank app opened a new window which you could detect with WinList - was I wrong? :huh:

If a new window is not opened, then what happens to the bank app which we could possibly detect? A colour change? A change of text? Anything detectable could then act as trigger and you would not get the "funny animation" when you cycle your GUI unnecessarily. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • 4 months later...

with examples is even more simple thank you Melba23 :D

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Link to comment
Share on other sites

  • 2 months later...

Hey there, so i tried this, and my objective is to hide the middle section, but whatever i do, i can't it hides the middle and the bottom section, the examples are not very clear to me, here's what i got:

#include <GUIConstantsEx.au3>
#include "GUIExtender.au3"
#include <SendMessage.au3>
Opt("GUIOnEventMode", 1)

$hGUI_1 = GUICreate("Vertical", 300, 250, 100, 100)
GUISetOnEvent($GUI_EVENT_CLOSE, "On_Exit")

_GUIExtender_Init($hGUI_1)

_GUIExtender_Section_Start($hGUI_1, 0, 120)
$hButton_1 = _GUIExtender_Section_Action($hGUI_1, 2, "", "", 270, 40, 15, 15, 0, 1) ; Normal button
GUICtrlCreateGroup("1", 10, 2, 250, 68)
_GUIExtender_Section_End($hGUI_1)

$iMore_Section = _GUIExtender_Section_Start($hGUI_1, 120, 180)
GUICtrlCreateGroup("2", 10, 78, 280, 80)
$hInput = GUICtrlCreateInput("Your input goes here", 40, 110, 180, 20)
_GUIExtender_Section_End($hGUI_1)

_GUIExtender_Section_Start($hGUI_1, 180, 240)
GUICtrlCreateGroup("3", 10, 162, 280, 80)
$hButton_3 = GUICtrlCreateButton("OK", 100, 210, 60, 20)
_GUIExtender_Section_End($hGUI_1)

_GUIExtender_Section_Extend($hGUI_1, 4, False)

GUISetState()

While 1
    Sleep(10)
WEnd

Func On_Exit()
    Exit
EndFunc
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

  • Moderators

careca,
 
A couple of reasons why the code does not work as you expect:
 
- 1. You are using the worng coordinates in the _GUIExtender_Section_Start call.  From the function header:

; Syntax.........: _GUIExtender_Section_Start($hWnd, $iSection_Coord, $iSection_Size)
; Parameters ....: $hWnd - Handle of GUI containing the section
;                  $iSection_Coord - Coordinates of left/top edge of section depending on orientation
;                  $iSection_Size  - Width/Height of section

So as your section is only 60 pixels deep, you need:

$iMore_Section = _GUIExtender_Section_Start($hGUI_1, 120, 60)

You initially had 120, 180 - that made the section as deep as the GUI and so you retracted the third part as well. ;)

- 2. As you have stored the index of the retractable section, why not use it in the _GUIExtender_Section_Extend call?  Where did the 4 come from?   :huh:

_GUIExtender_Section_Extend($hGUI_1, $iMore_Section, False)

When I make those changes the code works as I expect. All clear? :)

M23

Edited by Melba23
Fixed tag

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Hi, thanks for your help, i've made some changes and got a somewhat working code, but, and im not sure fif it was supposed to work like this, i had to recreate the bit that disappeared..

#include <GUIConstantsEx.au3>
#include "GUIExtender.au3"
Opt("GUIOnEventMode", 1)
Local $Button, $iThis_Section
$hGUI = GUICreate("Vertical", 300, 320, 100, 100)
GUISetOnEvent($GUI_EVENT_CLOSE, "On_Exit")

_GUIExtender_Init($hGUI)

$iThis_Section = _GUIExtender_Section_Start($hGUI, 0, 0)
$Button = _GUIExtender_Section_Action($hGUI, $iThis_Section + 1, "", "", 270, 40, 15, 15, 0, 1)
GUICtrlCreateGroup("1", 10, 2, 250, 70)
GUICtrlCreateGroup("3", 10, 78, 280, 70)
GUICtrlCreateGroup("4", 10, 162, 280, 70)
_GUIExtender_Section_End($hGUI)

_GUIExtender_Section_Start($hGUI, 0, 75)
Local $LV = GUICtrlCreateListView("2", 10, 78, 280, 70)
GUICtrlCreateListViewItem('123', $LV)
GUICtrlCreateGroup("3", 10, 162, 280, 70)
GUICtrlCreateGroup("4", 10, 235, 280, 70)
_GUIExtender_Section_End($hGUI)

GUISetState()

While 1
    Sleep(100)
WEnd

Func On_Exit()
    Exit
EndFunc
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

  • Moderators

careca,

 

That code makes no sense at all.  You define the section as beginning at 0 and 0 pixels deep and yet seemingly expect it to contain a button created by _GUIExtender_Section_Action 40 pixels into the GUI. :wacko:

 

Let me see if I can explain how the coordinates work visually:

GUI coords - created 200 deep

0    +--------+  - GUIExtender_Section_Start($hGUI, 0, 50)
     |        |        This section starts at 0 and is 50 pixels deep
     |        |
50   +--------+  - GUIExtender_Section_Start($hGUI, 50, 100)
     |        |         This section starts at 50 and is 100 pixels deep You can see that the "Start" value is the sum of the "Start" and "Depth" from the previous section
     |        |
100  |        |
     |        | 
     |        | 
150  +--------+  - GUIExtender_Section_Start($hGUI, 150, 50) 
     |        |          This section starts at 150 and is 50 pixels deep You can see that the "Start" value is the sum of the "Start" and "Depth" from the previous section
     |        | 
200  +--------+         And you can see that the final depth of the GUI is the sum of the "Start" and "Depth" of the final section
Does that make it clearer? :huh:

 

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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