Ibrahim Posted June 15, 2008 Posted June 15, 2008 setCtrlData for labels keep blinking if in a loop, where it's still the same characters not changed.And this makes my application so amateur (I'm Amateur but hiding the fact) any way around that please advice. [font="Arial Black"]My Stuff[/font]UPnP Port Forwarding Final.GateWay InformationThe GateWay Watcher(detect speeofing)Rightclick Any file --->Hide/UnhideThe Tip WatcherA PanelShare WatcherThe Arp WatcherThe Online License Checker
ResNullius Posted June 15, 2008 Posted June 15, 2008 setCtrlData for labels keep blinking if in a loop, where it's still the same characters not changed.And this makes my application so amateur (I'm Amateur but hiding the fact)any way around that please advice.Don't know what your loop looks like, but I would do a check to see if the label data needs to be changed and only set the data then, otherwise skip to the next label.
rasim Posted June 15, 2008 Posted June 15, 2008 IbrahimHi! To avoid from control flickering:1. Use ControlSetText() function instead of GUICtrlSetData() function.2. Before control text update compare current control text and new text, which you set of a control, and if this both text is different - update your control.P.S.Hope you understand my bad english
Ibrahim Posted June 15, 2008 Author Posted June 15, 2008 Thanks man but Still blinking. if u can show it with a progressbar() example i will be gratefull. [font="Arial Black"]My Stuff[/font]UPnP Port Forwarding Final.GateWay InformationThe GateWay Watcher(detect speeofing)Rightclick Any file --->Hide/UnhideThe Tip WatcherA PanelShare WatcherThe Arp WatcherThe Online License Checker
Ibrahim Posted June 15, 2008 Author Posted June 15, 2008 can u show it with an example simple GUI and Label viewing percent and some text and a progress bar [font="Arial Black"]My Stuff[/font]UPnP Port Forwarding Final.GateWay InformationThe GateWay Watcher(detect speeofing)Rightclick Any file --->Hide/UnhideThe Tip WatcherA PanelShare WatcherThe Arp WatcherThe Online License Checker
martin Posted June 15, 2008 Posted June 15, 2008 can u show it with an example simple GUI and Label viewing percent and some text and a progress barIt's up to the person with the problem to put in at least as much effort as those who are willing to help. IMO you should be able to give a sample of your problem or we could be wasting our time trying to fix the wrong thing. If you think it's simple for someone else to make a sample solution then it must also be simple for you to make a sample problem. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Ibrahim Posted June 15, 2008 Author Posted June 15, 2008 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ProgressConstants.au3> Local $msg GUICreate("My GUI") GUISetState(@SW_SHOW) $start_btn=GUICtrlCreateButton("Start",10,10,50,30) $progress=GUICtrlCreateProgress(10,50,150,30,$PBS_SMOOTH ) $label=GUICtrlCreateLabel("Percent",10,90,300,30) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $start_btn Then for $i = 1 to 500 GUICtrlSetData($progress,$i/5) ;~ GUICtrlSetData($label,"Percent is "&$i/5) ControlSetText("My GUI","",5,"The Current Percent is "&$i/5) sleep(10) Next EndIf WEnd GUIDelete() [font="Arial Black"]My Stuff[/font]UPnP Port Forwarding Final.GateWay InformationThe GateWay Watcher(detect speeofing)Rightclick Any file --->Hide/UnhideThe Tip WatcherA PanelShare WatcherThe Arp WatcherThe Online License Checker
ProgAndy Posted June 15, 2008 Posted June 15, 2008 I cant't see blinking in v. 3.2.12.0 But I can't read the decimal place, because it changes too fast. So you could do checking for No decimal places and only update then: If IsInt($i/5) Then ControlSetText("My GUI","",5,"The Current Percent is "&$i/5) *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
rasim Posted June 16, 2008 Posted June 16, 2008 IbrahimTry this:#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ProgressConstants.au3> GUICreate("My GUI") $start_btn = GUICtrlCreateButton("Start",10,10,50,30) $progress = GUICtrlCreateProgress(10,50,150,30,$PBS_SMOOTH ) GUICtrlCreateLabel("Percent: ", 10, 90, 45, 20) $PercentLabel = GUICtrlCreateLabel("100", 55, 90, 40, 20) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop Case $start_btn For $i = 1 to 500 GUICtrlSetData($progress, $i / 500 * 100) ControlSetText("My GUI", "", $PercentLabel, Int($i / 5)) Sleep(10) Next EndSwitch WEnd
Ibrahim Posted June 16, 2008 Author Posted June 16, 2008 good idea will make create a total makeOver to my script but i know now there is no Way around it thanks again rasim [font="Arial Black"]My Stuff[/font]UPnP Port Forwarding Final.GateWay InformationThe GateWay Watcher(detect speeofing)Rightclick Any file --->Hide/UnhideThe Tip WatcherA PanelShare WatcherThe Arp WatcherThe Online License Checker
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