scila1996 Posted September 2, 2014 Share Posted September 2, 2014 (edited) tôi viết một chương trình đọc một tệp tin văn bản sau và in nó ra từ từ a.txt aaaaaaaaaaaaaaaaaaaaaaaaaaaaa dddddddddddddddddddddddddd aaaaaaaaaaaaaaaaaaaaaaaaaaaaa dddddddddddddddddddddddddd aaaaaaaaaaaaaaaaaaaaaaaaaaaaa dddddddddddddddddddddddddd aaaaaaaaaaaaaaaaaaaaaaaaaaaaa dddddddddddddddddddddddddd aaaaaaaaaaaaaaaaaaaaaaaaaaaaa dddddddddddddddddddddddddd aaaaaaaaaaaaaaaaaaaaaaaaaaaaa dddddddddddddddddddddddddd aaaaaaaaaaaaaaaaaaaaaaaaaaaaa dddddddddddddddddddddddddd aaaaaaaaaaaaaaaaaaaaaaaaaaaaa dddddddddddddddddddddddddd #include <GUIConstants.au3> #include <File.au3> #include <String.au3> Local $Form1 = GUICreate("AForm1", 625, 443, 193, 115) Local $Label1 = GUICtrlCreateLabel("dsasd", 32, 16, 577, 412) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) GUISetState(@SW_SHOW) Local $readtext = _FileCountLines(@ScriptDir & "\a.txt") For $i = 1 To $readtext $linetext = FileReadLine(@ScriptDir & "\a.txt", $i) $Str = StringSplit($linetext, "") For $o = 1 To $Str[0] GUICtrlSetData($Label1, GUICtrlRead($Label1) & StringMid($linetext, $o, 1)) If ($o == $Str[0]) Then GUICtrlSetData($Label1, GUICtrlRead($Label1) & @CRLF) Sleep(20) Next Next While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ---> Works Well but there is a problem it continuously blinks and looks so bad how all the characters on screen are standing still and not blink > Edited September 2, 2014 by scila1996 Link to comment Share on other sites More sharing options...
computergroove Posted September 2, 2014 Share Posted September 2, 2014 tôi viết một chương trình đọc một tệp tin văn bản sau và in nó ra từ từ Translates to: "I wrote a program that reads a text file and then print it out slowly" Adjust the Sleep(20) and see what happens. Try Sleep(100) Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
UEZ Posted September 2, 2014 Share Posted September 2, 2014 Try: include <GUIConstants.au3> #include <File.au3> #include <String.au3> #include <WindowsConstants.au3> Local $Form1 = GUICreate("AForm1", 625, 443, 193, 115, Default,BitOR($WS_EX_COMPOSITED, $WS_EX_LAYERED)) ...Br,UEZ scila1996 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
scila1996 Posted September 4, 2014 Author Share Posted September 4, 2014 Thank UEZ Link to comment Share on other sites More sharing options...
scila1996 Posted September 4, 2014 Author Share Posted September 4, 2014 UEZ I have a problem anymore if I put sleep (10) or sleep (50) still blinks Link to comment Share on other sites More sharing options...
UEZ Posted September 4, 2014 Share Posted September 4, 2014 (edited) I cannot see any blinking when changing the sleep value.What you can try is to use GDI+ to have flicker free text printing. There are several examples how to use GDI+ for such tasks.Br,UEZ Edited September 4, 2014 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ 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