Naufuge Posted December 12, 2005 Share Posted December 12, 2005 My script uses a list view that you are able to add, and delete items from. The items are saved in a text file, which is "#included" after creating the listview. my Main Loop calls two functions to update the lists. but when it is running there is a Massive Flicker. How can i stop this? My loop is: While 1 Update_SettingList() Update_LogList() $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $File_Exit FileDelete(@ScriptDir & "\Configuration Files\Temp_Log.dbl") FileWrite(@ScriptDir & "\Configuration Files\Temp_Log.dbl","") ExitLoop ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... My Function for updating is: Func Update_SettingList() GuiCtrlDelete($Setting_List) $Setting_List = GUICtrlCreateListView("Setting Name|Status|Location|Runs|Failed|Total Time|Ping|Restarts", 0,0,740,155) #include <Configuration Files\Settings.dbl> EndFunc Link to comment Share on other sites More sharing options...
seandisanti Posted December 12, 2005 Share Posted December 12, 2005 My script uses a list view that you are able to add, and delete items from. The items are saved in a text file, which is "#included" after creating the listview. my Main Loop calls two functions to update the lists. but when it is running there is a Massive Flicker. How can i stop this? My loop is: While 1 Update_SettingList() Update_LogList() $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $File_Exit FileDelete(@ScriptDir & "\Configuration Files\Temp_Log.dbl") FileWrite(@ScriptDir & "\Configuration Files\Temp_Log.dbl","") ExitLoop ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... My Function for updating is: Func Update_SettingList() GuiCtrlDelete($Setting_List) $Setting_List = GUICtrlCreateListView("Setting Name|Status|Location|Runs|Failed|Total Time|Ping|Restarts", 0,0,740,155) #include <Configuration Files\Settings.dbl> EndFuncit looks like you have things in the loop that don't need to be done more than once... that will lead to flickering etc. Link to comment Share on other sites More sharing options...
Naufuge Posted December 13, 2005 Author Share Posted December 13, 2005 I dont NEED them in the loop, but it would make the app run more efficently if they where... Link to comment Share on other sites More sharing options...
GaryFrost Posted December 13, 2005 Share Posted December 13, 2005 i would suggest setting a flag, $datachanged = 0 if $datachanged then ; do your updates $datachanged = 0 endif SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
seandisanti Posted December 13, 2005 Share Posted December 13, 2005 I dont NEED them in the loop, but it would make the app run more efficently if they where...technically, unnecessary repetition IS inefficiency.... if you post a full script i'll see if i can't optimize it some for ya. (after i work out your signature) Link to comment Share on other sites More sharing options...
randallc Posted December 13, 2005 Share Posted December 13, 2005 Hi,Idon't understand how you are writing the individual listview items..Are they in the include?Anyway, are you using; (before and after each recreate/ rewrite of listview)Func _LockAndWait2() Local $Cursor_WAIT GUISetState(@SW_LOCK) GUISetCursor($Cursor_WAIT, 1)EndFunc ;==>_LockAndWait2Func _ResetLockWait2() Local $Cursor_ARROW GUISetState(@SW_UNLOCK) GUISetCursor($Cursor_ARROW, 1)EndFunc ;==>_ResetLockWait2to stop flicker?Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW 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