sandin Posted May 20, 2009 Author Share Posted May 20, 2009 @onderhold thank you. everyone can change or modify the code (otherwise I wouldn't have posted it in the first place ). I dun remember if you need to have certain amount of posts to attach the file, but you can do it in the "add reply" (but not the fast one), you'll see the attachment section bellow text writing. Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
lsakizada Posted June 12, 2009 Share Posted June 12, 2009 (edited) I am getting errors that some constants were not defined. I looked for the constants and found that they were not declared in the include file TreeVieConstants.au3. C:\All\B_QA\QA\MyTools\google\google\examples\Ini_Editor.au3(364,25) : WARNING: $TVN_SELCHANGED: possibly used before declaration. Case $TVN_SELCHANGED, ~~~~~~~~~~~~~~~~~~~~^ C:\All\B_QA\QA\MyTools\google\google\examples\Ini_Editor.au3(390,27) : WARNING: $TVN_ENDLABELEDIT: possibly used before declaration. Case $TVN_ENDLABELEDIT, ~~~~~~~~~~~~~~~~~~~~~~^ C:\All\B_QA\QA\MyTools\google\google\examples\Ini_Editor.au3(455,28) : WARNING: $TVN_ITEMEXPANDING: possibly used before declaration. Case $TVN_ITEMEXPANDING, ~~~~~~~~~~~~~~~~~~~~~~~^ C:\All\B_QA\QA\MyTools\google\google\examples\Ini_Editor.au3(457,29) : WARNING: $TVN_BEGINLABELEDIT: possibly used before declaration. Case $TVN_BEGINLABELEDIT, ~~~~~~~~~~~~~~~~~~~~~~~~^ C:\All\B_QA\QA\MyTools\google\google\examples\Ini_Editor.au3(461,24) : WARNING: $TVN_BEGINDRAG: possibly used before declaration. Case $TVN_BEGINDRAG, ~~~~~~~~~~~~~~~~~~~^ C:\All\B_QA\QA\MyTools\google\google\examples\Ini_Editor.au3(364,25) : ERROR: $TVN_SELCHANGED: undeclared global variable. Case $TVN_SELCHANGED, ~~~~~~~~~~~~~~~~~~~~^ I tried to use $TVN_SELCHANGEDA instead of SELCHANGED (because thats what i found in the include...) but I was not able to save ini names in the tree. How do I correct the problem? Edited June 12, 2009 by lsakizada Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
mesale0077 Posted June 12, 2009 Share Posted June 12, 2009 hi why problem line 364 problem error Case $TVN_SELCHANGED, $TVN_SELCHANGEDW Link to comment Share on other sites More sharing options...
lsakizada Posted June 12, 2009 Share Posted June 12, 2009 I tried to use $TVN_SELCHANGEDA instead of SELCHANGED (because thats what i found in the include...) but I was not able to save ini names in the tree. I am actually added this constants after all the includes: Global Const $TVN_SELCHANGED = $TVN_SELCHANGEDA Global Const $TVN_ENDLABELEDIT = $TVN_ENDLABELEDITA Global Const $TVN_ITEMEXPANDING = $TVN_ITEMEXPANDINGA Global Const $TVN_BEGINLABELEDIT = $TVN_BEGINLABELEDITA Global Const $TVN_BEGINDRAG = $TVN_BEGINDRAGA Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
lsakizada Posted June 13, 2009 Share Posted June 13, 2009 I am actually added this constants after all the includes: Global Const $TVN_SELCHANGED = $TVN_SELCHANGEDA Global Const $TVN_ENDLABELEDIT = $TVN_ENDLABELEDITA Global Const $TVN_ITEMEXPANDING = $TVN_ITEMEXPANDINGA Global Const $TVN_BEGINLABELEDIT = $TVN_BEGINLABELEDITA Global Const $TVN_BEGINDRAG = $TVN_BEGINDRAGA Well, I relaized now that my correction is working and the tool is working as designed. It was not set the text on the tree items when the focus set by the mouse and not by the enter keyboard a designed Probably its by design.... after reading the code. very nice code and utility. I will use it with my projects. Thanks! Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
hegearon Posted June 16, 2009 Share Posted June 16, 2009 Hi, great app and works perfectly for me on WinXP SP3 + AutoIt 3.3.0.0. Thanks for sharing! Link to comment Share on other sites More sharing options...
mesale0077 Posted June 16, 2009 Share Posted June 16, 2009 thank you no problem ,well worked,good works Link to comment Share on other sites More sharing options...
lsakizada Posted July 23, 2009 Share Posted July 23, 2009 A flicker free treeview control at last!Short post in order to keep those two other posts together and to notify about the edit of the latter:INI editor as a moduleA flicker free treeview control at last! (download)Hi onderhold,I was trying to make it free flicker on my version of this tool without much successful.Can you please describe exactly how to avoid flickering with your method?Maybe 2 simple GUIs one with and other without using your method.Thanks! Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
onderhold Posted July 23, 2009 Share Posted July 23, 2009 (edited) Can you please describe exactly how to avoid flickering with your method?Maybe 2 simple GUIs one with and other without using your method._GUICtrlTreeView_Create.noflicker.au3 contains the necessary code. I took the script _GUICtrlTreeView_Create.au3 from the AutoIT online help, and added my modifications. Just diff these two scripts and you will see what it needs - setting the extended window style of the window to $WS_EX_COMPOSITED during the resize operation, which gets notified by WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE messages.Why to set this style only during the resize operation:Setting the extended style $WS_EX_COMPOSITED permanently, e.g. with GUICreate(), does not work thoroughly - when the length of a treeview item value exceedes the treeview border, then the tooltips for those values do not get displayed properly._GUICtrlTreeView_Create.noflicker_demo.au3 lets you toggle the solution on and off. E.g. look at the tooltips of child items with $WS_EX_COMPOSITED forced on._GUICtrlTreeView_Create.noflicker_demo.au3_GUICtrlTreeView_Create.noflicker.au3 Edited August 10, 2009 by onderhold Link to comment Share on other sites More sharing options...
lsakizada Posted July 25, 2009 Share Posted July 25, 2009 _GUICtrlTreeView_Create.noflicker.au3 contains the necessary code. I took the script _GUICtrlTreeView_Create.au3 from the AutoIT online help, and added my modifications. Just diff these two scripts and you will see what it needs - setting the extended window style of the window to $WS_EX_COMPOSITED during the resize operation, which gets notified by WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE messages. Why to set this style only during the resize operation: Setting the extended style $WS_EX_COMPOSITED permanently, e.g. with GUICreate(), does not work thoroughly - when the length of a treeview item value exceedes the treeview border, then the tooltips for those values do not get displayed properly. _GUICtrlTreeView_Create.noflicker_demo.au3 lets you toggle the solution on and off. E.g. look at the tooltips of child items with $WS_EX_COMPOSITED forced on. P.S. I did attach a wrong Ini_Editor.ema.zip to my previous post. It's corrected now. Well, I have succeeded to set it up properly with the original Ini_editor code. but with my modified code the client messed up totaly. I still dont know the reason. For reference i added only the code bellow and its works: ;;FILCKER START Global Const $WM_ENTERSIZEMOVE = 0x0231 ; [ema] Global Const $WM_EXITSIZEMOVE = 0x0232 ; [ema] Global Const $WS_EX_COMPOSITED = 0x2000000 ; [ema] GUIRegisterMsg($WM_ENTERSIZEMOVE, "WM_ENTERSIZEMOVE") ; [ema] GUIRegisterMsg($WM_EXITSIZEMOVE, "WM_EXITSIZEMOVE") ; [ema] Global $g_IsResizing = False Func WM_ENTERSIZEMOVE($hWnd, $Msg, $wParam, $lParam) ; add $WS_EX_COMPOSITED to the extended window style #forceref $hWnd, $Msg, $wParam, $lParam Local $GUIStyle ; called when resizing begins If Not $g_IsResizing Then $GUIStyle = GUIGetStyle($Form1) GUISetStyle(-1, BitOR($GUIStyle[1], $WS_EX_COMPOSITED), $Form1) $g_IsResizing = True EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_ENTERSIZEMOVE Func WM_EXITSIZEMOVE($hWnd, $Msg, $wParam, $lParam) ; reset the extended window style to previous values #forceref $hWnd, $Msg, $wParam, $lParam Local $GUIStyle ; called when resizing ends If $g_IsResizing Then $GUIStyle = GUIGetStyle($Form1) GUISetStyle(-1, BitAND($GUIStyle[1], BitNOT($WS_EX_COMPOSITED)), $Form1) $g_IsResizing = False EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_EXITSIZEMOVE ;; FLICKER END Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
onderhold Posted July 25, 2009 Share Posted July 25, 2009 lsakizada, I'm sorry but I don't understand what you are trying to say. The code snippet that you posted is the essence of my proposed solution, it's the diff between "_GUICtrlTreeView_Create.au3" and "_GUICtrlTreeView_Create.noflicker.au3". What are you referring to by "original Ini_editor code"? sandin's code in post #1, or my mod "Ini_editor.ema" in post #48 or any other version? My mod "Ini_editor.ema" works flickerfree without further modifications. (prerequisite: Windows XP or higher, tested on Windows XP SP3) What is your modified client that messed up? Are you asking for help about it? Link to comment Share on other sites More sharing options...
lsakizada Posted July 25, 2009 Share Posted July 25, 2009 (edited) lsakizada, I'm sorry but I don't understand what you are trying to say.The code snippet that you posted is the essence of my proposed solution, it's the diff between "_GUICtrlTreeView_Create.au3" and "_GUICtrlTreeView_Create.noflicker.au3".What are you referring to by "original Ini_editor code"? sandin's code in post #1, or my mod "Ini_editor.ema" in post #48 or any other version? My mod "Ini_editor.ema" works flickerfree without further modifications. (prerequisite: Windows XP or higher, tested on Windows XP SP3)What is your modified client that messed up? Are you asking for help about it?onderold, your scripts are ok. I was able to remove flickers on the original code of ini (by "original Ini_editor code"? is mean created by sandin).But when I tried to set it on my ini-editor version i faced problems that I could not understand why.I will glad if you can help to solve my problem.I will post my code for your review. If you want to see the code without the problem then remove any code between my comment: ;;FILCKER START and ;; FLICKER END.I attached the file:ConfigLink.au3 Edited July 25, 2009 by lsakizada Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
onderhold Posted July 27, 2009 Share Posted July 27, 2009 lsakizada,unfortunately my antiflicker solution for treeview controls only works when there's no listview control on the same window.the best I can achieve with your app is this:;;ANTIFLICKER START Global Const $WM_EXITSIZEMOVE = 0x0232 Global Const $WS_EX_COMPOSITED = 0x2000000 GUIRegisterMsg($WM_SIZING, "WM_SIZING") GUIRegisterMsg($WM_EXITSIZEMOVE, "WM_EXITSIZEMOVE") Global $g_IsResizing = False Func WM_SIZING($hWnd, $Msg, $wParam, $lParam) ; add $WS_EX_COMPOSITED to the extended window style #forceref $hWnd, $Msg, $wParam, $lParam Local $GUIStyle If Not $g_IsResizing Then ; resizing begins GuiCtrlSetState($hListView, $GUI_HIDE) $GUIStyle = GUIGetStyle($Form1) GUISetStyle(-1, BitOR($GUIStyle[1], $WS_EX_COMPOSITED), $Form1) $g_IsResizing = True EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_ENTERSIZEMOVE Func WM_EXITSIZEMOVE($hWnd, $Msg, $wParam, $lParam) ; reset the extended window style to previous values #forceref $hWnd, $Msg, $wParam, $lParam Local $GUIStyle If $g_IsResizing Then ; resizing ends $GUIStyle = GUIGetStyle($Form1) GUISetStyle(-1, BitAND($GUIStyle[1], BitNOT($WS_EX_COMPOSITED)), $Form1) GuiCtrlSetState($hListView, $GUI_SHOW) $g_IsResizing = False EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_EXITSIZEMOVE ;;ANTIFLICKER ENDi.e. using WM_SIZING to note the beginning of resizing and hiding the listview control during resizing. All my other attempts failed ( _SendMessage($hListView, $WM_SETREDRAW, 0) as in this riddle or suppressing $WM_ERASEBKGND messages)Of course you will have to define the variable $hListView before this code block or move the whole block past the definition of $hListView, e.g. past the line"initMinMax(248, 220, @DesktopWidth, @DesktopHeight)" Link to comment Share on other sites More sharing options...
lsakizada Posted July 29, 2009 Share Posted July 29, 2009 (edited) lsakizada, unfortunately my antiflicker solution for treeview controls only works when there's no listview control on the same window. the best I can achieve with your app is this: ;;ANTIFLICKER START Global Const $WM_EXITSIZEMOVE = 0x0232 Global Const $WS_EX_COMPOSITED = 0x2000000 GUIRegisterMsg($WM_SIZING, "WM_SIZING") GUIRegisterMsg($WM_EXITSIZEMOVE, "WM_EXITSIZEMOVE") Global $g_IsResizing = False Func WM_SIZING($hWnd, $Msg, $wParam, $lParam) ; add $WS_EX_COMPOSITED to the extended window style #forceref $hWnd, $Msg, $wParam, $lParam Local $GUIStyle If Not $g_IsResizing Then ; resizing begins GuiCtrlSetState($hListView, $GUI_HIDE) $GUIStyle = GUIGetStyle($Form1) GUISetStyle(-1, BitOR($GUIStyle[1], $WS_EX_COMPOSITED), $Form1) $g_IsResizing = True EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_ENTERSIZEMOVE Func WM_EXITSIZEMOVE($hWnd, $Msg, $wParam, $lParam) ; reset the extended window style to previous values #forceref $hWnd, $Msg, $wParam, $lParam Local $GUIStyle If $g_IsResizing Then ; resizing ends $GUIStyle = GUIGetStyle($Form1) GUISetStyle(-1, BitAND($GUIStyle[1], BitNOT($WS_EX_COMPOSITED)), $Form1) GuiCtrlSetState($hListView, $GUI_SHOW) $g_IsResizing = False EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_EXITSIZEMOVE ;;ANTIFLICKER END i.e. using WM_SIZING to note the beginning of resizing and hiding the listview control during resizing. All my other attempts failed ( _SendMessage($hListView, $WM_SETREDRAW, 0) as in this riddle or suppressing $WM_ERASEBKGND messages) Of course you will have to define the variable $hListView before this code block or move the whole block past the definition of $hListView, e.g. past the line "initMinMax(248, 220, @DesktopWidth, @DesktopHeight)" Great, you found that the listView caused the problem. I did not have any clue what was the reason to this false behavior and how to debug it. Hiding the control is also was a good idea. If the no-flickering method does not work with listview then I might have other solution or try to create simple environment and post it in general help forum. Thank you very much! Have a good one. Edited July 29, 2009 by lsakizada Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
Technomancer Posted May 25, 2013 Share Posted May 25, 2013 Hi Sandin. I found a copy of this script, (v1.2), somewhere but i can't remember where. I recently attempted to try it but found a couple of errors which caused the program to continue running in the background when you click the 'Exit' button, (well, that was in the compiled file). It did the same in the scrip editor, Scite. I put in a query on the AutoIT Forums and someone replied with a suggestion to the cause. Anyway, i did some checking and managed to solve the problem. I've been looking for a good INI editor and finding and fixing the problems i can now use it. I assumed that the script being available to all, it could be classed as Open Source. Now i've found you i can put the Name into the script. I also added a few lines to back the INI file up to an'i_i' file. I like it and if you wrote the script you should get the credit. It really is a nice script. Link to comment Share on other sites More sharing options...
KiLLer001 Posted August 30, 2013 Share Posted August 30, 2013 (edited) love this though what would make it even better if it detected a Boolean value ( True or False ) is opened a combobox with True or false or a popup or something like that Edited August 30, 2013 by KiLLer001 Link to comment Share on other sites More sharing options...
TheSaint Posted September 1, 2013 Share Posted September 1, 2013 Ah, nothing like some good old Post Necromancy! P.S. Not only is this a topic from four years ago, but there are usually issues when using with more current versions of AutoIt. Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
water Posted September 1, 2013 Share Posted September 1, 2013 The author of this script has been away for more than 2 years. Do you expect him to reply to your questions? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
DickG Posted August 4, 2014 Share Posted August 4, 2014 sandin, I had to append "A" to most TreeViewConstants vars to get it to work. So the "A" must have been added after you posted this. But it's really awesome! I use INI files extensively. So I wrote an INI Manager for myself to help with things like adding fields to piped INI sections, renaming fields, repositioning fields, deleting fields, testing an INI section, and so on. It's not perfect, but I continue to tweak it. But your script does things I did not know how to do. I will study your script to learn from it. Thanks much for this posting. Dick Link to comment Share on other sites More sharing options...
Technomancer Posted August 23, 2014 Share Posted August 23, 2014 Hi, I know this is an old topic but I downloaded the script and got it to work, played with it and tried to 'tweak' it. My problem is that I can't figure out how to make it accept command line parameters. It's a great little INI editor, if anyone can help with the problem can you help. P.S. who actually wrote the original?, If I use it I want to give credit where credit is due. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now