Fixed Control Editor respond too slow

Area for english topics
Antworten
lyogadi
Beiträge: 5
Registriert: Mi 27. Dez 2017, 03:47
Kontaktdaten:

Fixed Control Editor respond too slow

Beitrag von lyogadi »

First, I love this project very much, I can't think that AutoIt can make this big Project. But I have some problem about speed (I think something can't be change with this limited language) in Formstudio2 (Control Editor respond to slow when I click to change Tab), Editor (when using to much variables, it make Editor lag when something inputted) and I don't know why new Plugin can't add (When I add regex_toolkit.icp plugin, the ISN show error: Plugin could not be imported)

I decide to find the reason why the responding to slow in Control Editor and I figure out it's problem

I fixed this problem by using an array to define variable and use For ... In .. to @SW_SHOW and @SW_HIDE the control, so that I can just Hide and Show a specific control to reduce loading time and fixed other things can't use array by the same way

Then main problem make Control Editor too slow are _Tab_SetImage_with_Text() and I figure out that the code use _Minieditor_tab_select(-1) two times when it's loading a Tab, so that I delete 1 time.

Things changed: I just modified 2 file: formstudio2.au3 and Addons3.au3
- In formstudio2.au3:
+ I redefine a Local variable: $iLastTab1 = 0 to save last Tab chose, delete a If WinActive($GUI_Editor) Then (I don't know what changed when I cut off this line)
+ Move Local $Pos_oldpos out of While loop
+ Move the $iLastTab1 = $iCurrTab1 down
+ Add _Minieditor_tab_select(-1) before _Minieditor_tab_select(0)
+ Delete sleep(10) in While loop
- In Addons3.au3: I define 3 variables on the top:
+ $Gui_Setting_Tab_Var[5], $Control_Editor_Setting_Var[5], $Control_Editor_Setting_LastTab = 0.
+ Change Func _Form_bearbeitenGUI_tab_select($tab = -1) to _Form_bearbeitenGUI_tab_select($tab, $lasttab = -1) to save last Tab
+ Change the code in 2 Func: _Form_bearbeitenGUI_tab_select($tab, $lasttab = -1) and _Minieditor_tab_select($tab = -1)

I changed _Form_bearbeitenGUI_tab_select() because at first I think this Func control the Control Editor and it work so beautiful so I keep this changed

Can others small things changed but I don't remember

Thank you for making this beautiful IDE! Hope it more complete day by day!
(Sorry for my bad English)
Dateianhänge
formstudio2.rar
(19.3 KiB) 739-mal heruntergeladen
lyogadi
Beiträge: 5
Registriert: Mi 27. Dez 2017, 03:47
Kontaktdaten:

Re: Fixed Control Editor respond too slow

Beitrag von lyogadi »

I figure out It has bug when I minimize and restore ISN main window, the form studio change to white, it disappear when I click to other Tab and return to form studio Tab
Benutzeravatar
ISI360
Administrator
Beiträge: 324
Registriert: Fr 11. Okt 2013, 13:06
Kontaktdaten:

Re: Fixed Control Editor respond too slow

Beitrag von ISI360 »

Hi!

Thank you for your feedback and your great help!

But please can you reupload your .rar archive with the edited files? It looks like it is corrupted.. (I can´t open it)

Thanks!
lyogadi
Beiträge: 5
Registriert: Mi 27. Dez 2017, 03:47
Kontaktdaten:

Re: Fixed Control Editor respond too slow

Beitrag von lyogadi »

- Okay, I upload by 2 ways, in attachment and google drive, files here: https://drive.google.com/open?id=1HswZR ... X_txSAYblK

- In addition, How do you think about this idea: After make a Form, .isf file will contain a function and return a Handle of Gui (Global variables will be auto added before that function) instead of normal way because I can call that Gui many times, I can delete that Gui instead of just make it invisible or delete completely and can't recall it!
Dateianhänge
formstudio2.rar
(19.3 KiB) 704-mal heruntergeladen
Benutzeravatar
ISI360
Administrator
Beiträge: 324
Registriert: Fr 11. Okt 2013, 13:06
Kontaktdaten:

Re: Fixed Control Editor respond too slow

Beitrag von ISI360 »

Thanks you very much! I will check your code.

Sounds like a good idea. So if i understand you right, it should contain the code in this way:

Code: Alles auswählen

Global $hashhassha

Func Example()   
    $hGUI = GUICreate("Example")
    $idOK = GUICtrlCreateButton("OK", 310, 370, 85, 25)
    return $hGUI
EndFunc  

Would be possible, but i think this should not be enabled by default, but can be enabled in the form settings in the form studio.
lyogadi
Beiträge: 5
Registriert: Mi 27. Dez 2017, 03:47
Kontaktdaten:

Re: Fixed Control Editor respond too slow

Beitrag von lyogadi »

Yes, That's exactly what I mean :D
Benutzeravatar
ISI360
Administrator
Beiträge: 324
Registriert: Fr 11. Okt 2013, 13:06
Kontaktdaten:

Re: Fixed Control Editor respond too slow

Beitrag von ISI360 »

Just for info: All these stuff is included in the next update (1.07), wich will be released the next days.
lyogadi
Beiträge: 5
Registriert: Mi 27. Dez 2017, 03:47
Kontaktdaten:

Re: Fixed Control Editor respond too slow

Beitrag von lyogadi »

It works very well in the new version but I think I have some suggestions:
1. With new features (Creating GUI as a function) I think the global variables (or variables before function) shouldn't include GuiCreate's handle or it will have an option where I can declare each variable as local or global (Local variables don't need to be displayed outside the function).
2. Variable $GUI_WS_EX_PARENTDRAG should be add to Label ExStyle (I found that this variable did not help at all in GUI's option)
3. It would be better if I could set a default font, font size... for all the controls in the GUI
4. Is it possible to add Undo feature in Form Studio?
Thank you! :D

P/s: I do not know whether I should create a new topic or reply in this topic when I have a new issue. :lol:
Antworten