zoel Posted June 3, 2019 Share Posted June 3, 2019 Hi people, I have a tooltip in my code that shows some text when a user hovers over a button, when I put a lot of text it gives me an error. Thank you!! Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 3, 2019 Moderators Share Posted June 3, 2019 Once again, if you would read the error you would see that is it telling you what is wrong... "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
zoel Posted June 3, 2019 Author Share Posted June 3, 2019 @JLogan3o13 I'm 16 years old kid and I just started coding is been 1 week, how am i supposed to know everything, did you knew everything when you were a noob? I cant understand what the error is. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 3, 2019 Moderators Share Posted June 3, 2019 1 hour ago, zoel said: did you knew everything when you were a noob? Nope, but I knew that posting pictures was for Facebook, not a coding forum. Post your code, so people aren't forced to first guess at what you're doing and then try to fix it for you. The error looks just like the last one where you changed a function name but didn't change it in all parts of the code, but without seeing said code it is a little difficult to spoon-feed the answers to you. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
iamtheky Posted June 3, 2019 Share Posted June 3, 2019 (edited) Im taking a swing. The problem is that you copy and pasted this "With IPconfig /all you can also find out your DNS server and MAC Address" from a website and picked up some unwanted zero-space html characters. Copy your text into notepad or something that discards those characters, and then into Scite, or type it manually and you would not experience this issue. edit: or hit backspace at the end of the word MAC and the end of the word ALL and I bet the cursor doesnt move but a character gets deleted. Edited June 3, 2019 by iamtheky zoel, Xandy and czardas 3 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
zoel Posted June 3, 2019 Author Share Posted June 3, 2019 @iamtheky Thank you my friend, you guessed correct, i copy and paste from a site, but now it works. Link to comment Share on other sites More sharing options...
zoel Posted June 3, 2019 Author Share Posted June 3, 2019 The problem is that the tooltip shows as 2 big lines, what parameters can i pass to be in a fixed size. expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <AutoItConstants.au3> #include <GuiEdit.au3> #include <ScrollBarsConstants.au3> #include <GUIToolTip.au3> #include <WinAPIDlg.au3> Local $aWndPos Local $vDos, $sline = "" $NetAs = GUICreate("NetAs-Network Assistant", 1096, 521, 182, 135) Local $idFilemenu = GUICtrlCreateMenu("&File") Local $idExititem = GUICtrlCreateMenuItem("Exit", $idFilemenu) Local $idSaveitem = GUICtrlCreateMenuItem("Save", $idFilemenu) Local $idInput = GUICtrlCreateEdit("", 168, 34, 921, 465) GUICtrlSetFont(-1, 10, 400, 0, "Courier") GUICtrlSetBkColor(-1, 0x0000FF) GUICtrlSetColor($idInput, 0xFFFFFF) Local $Button1 = GUICtrlCreateButton("IPconfig", 48, 56, 75, 25) GUICtrlSetTip($Button1, "To display all of your current IP information for all adapters. With ipconfig /all you can also find out your DNS Server and MAC Address. This will show your ethernet adapters full TCPIP configuration for all adapters on your Windows computer. You can find out your own IP Address as well as your default gateway.", "ipconfig /all") Local $Button3 = GUICtrlCreateButton("FlushDNS", 48, 96, 75, 25) Local $Button5 = GUICtrlCreateButton("ConnRelease", 48, 136, 75, 25) Local $Button7 = GUICtrlCreateButton("DisplayDNS", 48, 176, 75, 25) Local $Button9 = GUICtrlCreateButton("Route Print", 48, 216, 75, 25) Local $Button11 = GUICtrlCreateButton("ARP", 48, 256, 75, 25) Local $Button13 = GUICtrlCreateButton("NSLookup", 48, 296, 75, 25) Local $Button15 = GUICtrlCreateButton("NetStat -an", 48, 336, 75, 25) Local $Button17 = GUICtrlCreateButton("GetMac", 48, 376, 75, 25) Local $Button19 = GUICtrlCreateButton("Ping", 48, 416, 75, 25) Local $Button23 = GUICtrlCreateButton("Run", 656, 8, 73, 25) Local $Button24 = GUICtrlCreateButton("Clear", 576, 8, 75, 25) Local $Input1 = GUICtrlCreateInput("", 736, 8, 345, 21) GUISetState(@SW_SHOW) $hENTER = GUICtrlCreateDummy() Dim $AccelKeys[1][2] = [["{ENTER}", $hENTER]] ; Set accelerators GUISetAccelerators($AccelKeys) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $idExititem Exit Case $Button1 GUICtrlSetData($idInput, _CmdInfo() & @CRLF) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) Case $idSaveitem Local $editcontent = guictrlread($idInput) FileWrite($idInput, "Line 2") Case $Button3 GUICtrlSetData($idInput, _CmdInfo2() & @CRLF) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) Case $Button5 GUICtrlSetData($idInput, _CmdInfo3() & @CRLF) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) Case $Button7 GUICtrlSetData($idInput, _CmdInfo4() & @CRLF) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) Case $Button9 GUICtrlSetData($idInput, _CmdInfo5() & @CRLF) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) Case $Button11 GUICtrlSetData($idInput, _CmdInfo6() & @CRLF) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) Case $Button13 GUICtrlSetData($idInput, _CmdInfo7() & @CRLF) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) Case $Button15 GUICtrlSetData($idInput, _CmdInfo8() & @CRLF) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) Case $Button17 GUICtrlSetData($idInput, _CmdInfo9() & @CRLF) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) Case $Button19 GUICtrlSetData($idInput, _CmdInfo10() & @CRLF) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) Case $Button24 GUICtrlSetData($idInput, "") Case $Button23, $hENTER $vDos = Run(@ComSpec & " /c " & GUICtrlRead($Input1), @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $sline &= StdoutRead($vDos) If @error Then ExitLoop WEnd GUICtrlSetData($idInput, $sline & @CRLF) GUICtrlSetData($Input1, "") ;----> Reset $sline = "" EndSwitch WEnd Func _CmdInfo($_sCmdInfo = "ipconfig /all") Local $iPID = Run(@ComSpec & " /c " & $_sCmdInfo, "", @SW_HIDE, BitOR($STDERR_CHILD, $STDOUT_CHILD)) ; Wait until the process has closed using the PID returned by Run. ProcessWaitClose($iPID) ; Read the Stdout stream of the PID returned by Run. This can also be done in a while loop. Look at the example for StderrRead. Local $sOutput = StringReplace(StdoutRead($iPID), @CRLF & @CRLF, @CRLF) Local $sOutErr = StringReplace(StderrRead($iPID), @CRLF & @CRLF, @CRLF) Local $sReult = $sOutput <> "" ? $sOutput : $sOutErr Return $sReult EndFunc Func _CmdInfo2($_sCmdInfo2 = "IPConfig /FlushDNS") Local $iPID = Run(@ComSpec & " /c " & $_sCmdInfo2, "", @SW_HIDE, BitOR($STDERR_CHILD, $STDOUT_CHILD)) ; Wait until the process has closed using the PID returned by Run. ProcessWaitClose($iPID) ; Read the Stdout stream of the PID returned by Run. This can also be done in a while loop. Look at the example for StderrRead. Local $sOutput = StringReplace(StdoutRead($iPID), @CRLF & @CRLF, @CRLF) Local $sOutErr = StringReplace(StderrRead($iPID), @CRLF & @CRLF, @CRLF) Local $sReult = $sOutput <> "" ? $sOutput : $sOutErr Return $sReult EndFunc Func _CmdInfo3($_sCmdInfo3 = "IPConfig /Release") Local $iPID = Run(@ComSpec & " /c " & $_sCmdInfo3, "", @SW_HIDE, BitOR($STDERR_CHILD, $STDOUT_CHILD)) ; Wait until the process has closed using the PID returned by Run. ProcessWaitClose($iPID) ; Read the Stdout stream of the PID returned by Run. This can also be done in a while loop. Look at the example for StderrRead. Local $sOutput = StringReplace(StdoutRead($iPID), @CRLF & @CRLF, @CRLF) Local $sOutErr = StringReplace(StderrRead($iPID), @CRLF & @CRLF, @CRLF) Local $sReult = $sOutput <> "" ? $sOutput : $sOutErr Return $sReult EndFunc Func _CmdInfo4($_sCmdInfo4 = "ipconfig /displaydns") Local $iPID = Run(@ComSpec & " /c " & $_sCmdInfo4, "", @SW_HIDE, BitOR($STDERR_CHILD, $STDOUT_CHILD)) ; Wait until the process has closed using the PID returned by Run. ProcessWaitClose($iPID) ; Read the Stdout stream of the PID returned by Run. This can also be done in a while loop. Look at the example for StderrRead. Local $sOutput = StringReplace(StdoutRead($iPID), @CRLF & @CRLF, @CRLF) Local $sOutErr = StringReplace(StderrRead($iPID), @CRLF & @CRLF, @CRLF) Local $sReult = $sOutput <> "" ? $sOutput : $sOutErr Return $sReult EndFunc Func _CmdInfo5($_sCmdInfo5 = "Route Print") Local $iPID = Run(@ComSpec & " /c " & $_sCmdInfo5, "", @SW_HIDE, BitOR($STDERR_CHILD, $STDOUT_CHILD)) ; Wait until the process has closed using the PID returned by Run. ProcessWaitClose($iPID) ; Read the Stdout stream of the PID returned by Run. This can also be done in a while loop. Look at the example for StderrRead. Local $sOutput = StringReplace(StdoutRead($iPID), @CRLF & @CRLF, @CRLF) Local $sOutErr = StringReplace(StderrRead($iPID), @CRLF & @CRLF, @CRLF) Local $sReult = $sOutput <> "" ? $sOutput : $sOutErr Return $sReult EndFunc Func _CmdInfo6($_sCmdInfo6 = "ARP -a") Local $iPID = Run(@ComSpec & " /c " & $_sCmdInfo6, "", @SW_HIDE, BitOR($STDERR_CHILD, $STDOUT_CHILD)) ; Wait until the process has closed using the PID returned by Run. ProcessWaitClose($iPID) ; Read the Stdout stream of the PID returned by Run. This can also be done in a while loop. Look at the example for StderrRead. Local $sOutput = StringReplace(StdoutRead($iPID), @CRLF & @CRLF, @CRLF) Local $sOutErr = StringReplace(StderrRead($iPID), @CRLF & @CRLF, @CRLF) Local $sReult = $sOutput <> "" ? $sOutput : $sOutErr Return $sReult EndFunc Func _CmdInfo7($_sCmdInfo7 = "NSLookup") Local $iPID = Run(@ComSpec & " /c " & $_sCmdInfo7, "", @SW_HIDE, BitOR($STDERR_CHILD, $STDOUT_CHILD)) ; Wait until the process has closed using the PID returned by Run. ProcessWaitClose($iPID) ; Read the Stdout stream of the PID returned by Run. This can also be done in a while loop. Look at the example for StderrRead. Local $sOutput = StringReplace(StdoutRead($iPID), @CRLF & @CRLF, @CRLF) Local $sOutErr = StringReplace(StderrRead($iPID), @CRLF & @CRLF, @CRLF) Local $sReult = $sOutput <> "" ? $sOutput : $sOutErr Return $sReult EndFunc Func _CmdInfo8($_sCmdInfo8 = "netstat -an") Local $iPID = Run(@ComSpec & " /c " & $_sCmdInfo8, "", @SW_HIDE, BitOR($STDERR_CHILD, $STDOUT_CHILD)) ; Wait until the process has closed using the PID returned by Run. ProcessWaitClose($iPID) ; Read the Stdout stream of the PID returned by Run. This can also be done in a while loop. Look at the example for StderrRead. Local $sOutput = StringReplace(StdoutRead($iPID), @CRLF & @CRLF, @CRLF) Local $sOutErr = StringReplace(StderrRead($iPID), @CRLF & @CRLF, @CRLF) Local $sReult = $sOutput <> "" ? $sOutput : $sOutErr Return $sReult EndFunc Func _CmdInfo9($_sCmdInfo9 = "getmac") Local $iPID = Run(@ComSpec & " /c " & $_sCmdInfo9, "", @SW_HIDE, BitOR($STDERR_CHILD, $STDOUT_CHILD)) ; Wait until the process has closed using the PID returned by Run. ProcessWaitClose($iPID) ; Read the Stdout stream of the PID returned by Run. This can also be done in a while loop. Look at the example for StderrRead. Local $sOutput = StringReplace(StdoutRead($iPID), @CRLF & @CRLF, @CRLF) Local $sOutErr = StringReplace(StderrRead($iPID), @CRLF & @CRLF, @CRLF) Local $sReult = $sOutput <> "" ? $sOutput : $sOutErr Return $sReult EndFunc Func _CmdInfo10($_sCmdInfo10 = "ping google.com") Local $iPID = Run(@ComSpec & " /c " & $_sCmdInfo10, "", @SW_HIDE, BitOR($STDERR_CHILD, $STDOUT_CHILD)) ; Wait until the process has closed using the PID returned by Run. ProcessWaitClose($iPID) ; Read the Stdout stream of the PID returned by Run. This can also be done in a while loop. Look at the example for StderrRead. Local $sOutput = StringReplace(StdoutRead($iPID), @CRLF & @CRLF, @CRLF) Local $sOutErr = StringReplace(StderrRead($iPID), @CRLF & @CRLF, @CRLF) Local $sReult = $sOutput <> "" ? $sOutput : $sOutErr Return $sReult EndFunc Link to comment Share on other sites More sharing options...
iamtheky Posted June 3, 2019 Share Posted June 3, 2019 You are seeking a larger screen, or the settings where you could configure your screen size as larger than what is currently attached. zoel 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
zoel Posted June 3, 2019 Author Share Posted June 3, 2019 Thank you man! Link to comment Share on other sites More sharing options...
iamtheky Posted June 3, 2019 Share Posted June 3, 2019 And given your menu flow, @taietel's GUI may provide you a quick route to understanding more about what you can pull off cleanly in a small window. I still use his model 7 years later. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
zoel Posted June 3, 2019 Author Share Posted June 3, 2019 @iamtheky I'll give it a look, I appreciate your help! 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