Seite 1 von 1

Fixed Control Editor respond too slow

Verfasst: Mi 27. Dez 2017, 04:49
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)

Re: Fixed Control Editor respond too slow

Verfasst: Mi 27. Dez 2017, 04:55
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

Re: Fixed Control Editor respond too slow

Verfasst: Sa 13. Jan 2018, 13:38
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!

Re: Fixed Control Editor respond too slow

Verfasst: Fr 2. Feb 2018, 11:42
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!

Re: Fixed Control Editor respond too slow

Verfasst: So 4. Feb 2018, 11:26
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.

Re: Fixed Control Editor respond too slow

Verfasst: Mo 5. Feb 2018, 05:45
von lyogadi
Yes, That's exactly what I mean :D

Re: Fixed Control Editor respond too slow

Verfasst: Mi 21. Feb 2018, 14:53
von ISI360
Just for info: All these stuff is included in the next update (1.07), wich will be released the next days.

Re: Fixed Control Editor respond too slow

Verfasst: Sa 24. Mär 2018, 09:48
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: