abdulrahmanok Posted October 21, 2016 Share Posted October 21, 2016 (edited) Hello Brothers , I came Again with Another Hard thing To Learn Please Follow Example : ConsoleWrite(" I want output this " ) What I want is Someway to read All the ConsoleWrite Outputs Local $link = _INetGetSource('https://raw.githubusercontent.com/abdulrahmanok/Version/master/LatestVersionLink') Local $hDownload = InetGet($link, @ScriptDir & "\CaleUpdate.exe", Default, $INET_DOWNLOADBACKGROUND) ; Wait for the download to complete by monitoring when the 2nd index value of InetGetInfo returns True. Do $ArrayOFDownloadStatuts = InetGetInfo($hDownload) ConsoleWrite("currently downloaded " & Round($ArrayOFDownloadStatuts[0] / 2 ^ 10) & " KB" & @CRLF) ConsoleWrite("Total Size " & Round($ArrayOFDownloadStatuts[1] / 2 ^ 20, 2) & " MB" & @CRLF) Sleep(250) Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) Global $file = @ScriptDir & "\Version.txt" FileWrite($file,$versionCheck&@CRLF) Run(@ScriptDir & "\CaleUpdate.exe") EndFunc ;==>checkupdate Because I want To Output : ConsoleWrite("currently downloaded " & Round($ArrayOFDownloadStatuts[0] / 2 ^ 10) & " KB" & @CRLF) ConsoleWrite("Total Size " & Round($ArrayOFDownloadStatuts[1] / 2 ^ 20, 2) & " MB" & @CRLF) To make User Know what is download Data . Solved by Another Way : Thank You all guys For Your efforts. Edited October 21, 2016 by abdulrahmanok Link to comment Share on other sites More sharing options...
l3ill Posted October 21, 2016 Share Posted October 21, 2016 So you want the user to see what you see in the console? Have a look at Toast in M23's sig... He also has another tool like that that shows messages on the screen edge. My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
abdulrahmanok Posted October 21, 2016 Author Share Posted October 21, 2016 2 minutes ago, l3ill said: So you want the user to see what you see in the console? Have a look at Toast in M23's sig... He also has another tool like that that shows messages on the screen edge. yes i want this , but I didn't understand about M23's............................ Link to comment Share on other sites More sharing options...
Jfish Posted October 21, 2016 Share Posted October 21, 2016 There is a moderator whose name is @Melba23. The abbreviation for his name is M23. Check his signature block. abdulrahmanok 1 Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt Link to comment Share on other sites More sharing options...
l3ill Posted October 21, 2016 Share Posted October 21, 2016 Just now, Jfish said: There is a moderator whose name is @Melba23. The abbreviation for his name is M23. Check his signature block. Thanks you Jfish 1 My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
l3ill Posted October 21, 2016 Share Posted October 21, 2016 abdulrahmanok 1 My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
abdulrahmanok Posted October 21, 2016 Author Share Posted October 21, 2016 Just now, l3ill said: Ty , I will try this and inform you Link to comment Share on other sites More sharing options...
l3ill Posted October 21, 2016 Share Posted October 21, 2016 A much simpler method (but missing some bells and whistles): TrayTip #include <TrayConstants.au3> Run("notepad.exe") $hWnd = WinWait("[CLASS:Notepad]") If WinExists($hWnd) Then ;~ MsgBox(0, "", "") TrayTip("", "Notepad Succesfully Started", 5) Sleep(5000) EndIf My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
abdulrahmanok Posted October 21, 2016 Author Share Posted October 21, 2016 51 minutes ago, l3ill said: A much simpler method (but missing some bells and whistles): TrayTip #include <TrayConstants.au3> Run("notepad.exe") $hWnd = WinWait("[CLASS:Notepad]") If WinExists($hWnd) Then ;~ MsgBox(0, "", "") TrayTip("", "Notepad Succesfully Started", 5) Sleep(5000) EndIf I don't understand what your code exactly for , it even not has "ConsoleWrite" Link to comment Share on other sites More sharing options...
nitekram Posted October 21, 2016 Share Posted October 21, 2016 Your output to the console can be part of your GUI, just make a label for it, and update it as needed. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
abdulrahmanok Posted October 21, 2016 Author Share Posted October 21, 2016 1 minute ago, nitekram said: Your output to the console can be part of your GUI, just make a label for it, and update it as needed. I Already have Label But Cant get consolewrite value into it For Example : $asd=ConsoleWrite("Its just try") msgbox(0, $asd,asd) always empty msgbox Link to comment Share on other sites More sharing options...
l3ill Posted October 21, 2016 Share Posted October 21, 2016 Thats not how Consolewrite works... My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
l3ill Posted October 21, 2016 Share Posted October 21, 2016 ;~ $asd=ConsoleWrite("Its just try") $asd ="Its just try" msgbox(0, $asd, $asd) My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
abdulrahmanok Posted October 21, 2016 Author Share Posted October 21, 2016 13 minutes ago, l3ill said: ;~ $asd=ConsoleWrite("Its just try") $asd ="Its just try" msgbox(0, $asd, $asd) I Noticed Another Solution from this reply : Func checkupdate() Local $link = _INetGetSource('https://github.com/abdulrahmanok/Version/raw/master/LatestVersionLink') Local $hDownload = InetGet($link, @ScriptDir & "\CaleUpdate.exe", Default, $INET_DOWNLOADBACKGROUND) ; Wait for the download to complete by monitoring when the 2nd index value of InetGetInfo returns True. Do $ArrayOFDownloadStatuts = InetGetInfo($hDownload) $currentlydownloaded=Round($ArrayOFDownloadStatuts[0] / 2 ^ 10) & " KB" & @CRLF $TotalSize= Round($ArrayOFDownloadStatuts[1] / 2 ^ 20, 2) & " MB" & @CRLF SplashTextOn("Download Update" ,$currentlydownloaded&@CRLF&"Out OF "&$TotalSize) ;ConsoleWrite("currently downloaded " & Round($ArrayOFDownloadStatuts[0] / 2 ^ 10) & " KB" & @CRLF) ;consoleWrite("TotalSize " & Round($ArrayOFDownloadStatuts[1] / 2 ^ 20, 2) & " MB" & @CRLF) Sleep(250) Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) $hFO = FileOpen(@ScriptDir & "\Version.txt", 2) FileWrite($hFO, $versionCheck&@CRLF) FileClose($hFO) Run(@ScriptDir & "\CaleUpdate.exe") Exit EndFunc ;==>checkupdate Now I'm using "SplashTextON" To Get CurrentlyDownload And TotalSize but the problem is This splash screen Between (Do and Until) loop so its fade in ( show and hide many times ) is there is any solution to this ? Link to comment Share on other sites More sharing options...
l3ill Posted October 21, 2016 Share Posted October 21, 2016 Yes, use nitekrams idea and build a little GUI that stays on the screen during your process that displays the desired text. My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
abdulrahmanok Posted October 21, 2016 Author Share Posted October 21, 2016 TrayTip ("Download Update" ,$currentlydownloaded&@CRLF&"Out OF "&$TotalSize,2000) This is working But I think "SplashTexton" will be better Link to comment Share on other sites More sharing options...
l3ill Posted October 21, 2016 Share Posted October 21, 2016 If you really wanna stretch your horizons have a look at the Progress functions in the same folder as Splash. My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
abdulrahmanok Posted October 21, 2016 Author Share Posted October 21, 2016 (edited) 6 minutes ago, l3ill said: If you really wanna stretch your horizons have a look at the Progress functions in the same folder as Splash. I Did , I learned how Toast_Example.au3 Progress working but i didn't add it because its increase my program Memory size processes My program Current memory size is above 45000 Edited October 21, 2016 by abdulrahmanok Link to comment Share on other sites More sharing options...
nitekram Posted October 21, 2016 Share Posted October 21, 2016 41 minutes ago, abdulrahmanok said: I Already have Label But Cant get consolewrite value into it For Example : $asd=ConsoleWrite("Its just try") msgbox(0, $asd,asd) always empty msgbox Use this for your label or create a variable out of this data to be used: Round($ArrayOFDownloadStatuts[0] / 2 ^ 10) & " KB" 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
abdulrahmanok Posted October 21, 2016 Author Share Posted October 21, 2016 15 minutes ago, nitekram said: Use this for your label or create a variable out of this data to be used: Round($ArrayOFDownloadStatuts[0] / 2 ^ 10) & " KB" Finally Worked But with TextBox because Label has Some strange problems Final code : Do $ArrayOFDownloadStatuts = InetGetInfo($hDownload) $currentlydownloaded=Round($ArrayOFDownloadStatuts[0] / 2 ^ 10) & " KB" & @CRLF $TotalSize= Round($ArrayOFDownloadStatuts[1] / 2 ^ 20, 2) & " MB" & @CRLF $readvalue= $currentlydownloaded&@CRLF&"Out OF "&$TotalSize $try1 = ControlSetText("", "", $try, $readvalue) ;try is my Gui Text ;~ TrayTip ("Download Progress" ,$currentlydownloaded&@CRLF&"Out OF "&$TotalSize,2000) ;~ ;ConsoleWrite("currently downloaded " & Round($ArrayOFDownloadStatuts[0] / 2 ^ 10) & " KB" & @CRLF) ;~ ;consoleWrite("TotalSize " & Round($ArrayOFDownloadStatuts[1] / 2 ^ 20, 2) & " MB" & @CRLF) ;~ Sleep(250) Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) 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