Leaderboard
Popular Content
Showing content with the highest reputation on 06/03/2019 in all areas
-
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.2 points
-
Font collor
argumentum and one other reacted to Earthshine for a topic
read the comments of the posted code to figure out your answer.2 points -
Version 1.7.0.1
10,054 downloads
Extensive library to control and manipulate Microsoft Outlook. This UDF holds the functions to automate items (folders, mails, contacts ...) in the background. Can be seen like an API. There are other UDFs available to automate Outlook: OutlookEX_GUI: This UDF holds the functions to automate the Outlook GUI. OutlookTools: Allows to import/export contacts and events to VCF/ICS files and much more. Threads: Development - General Help & Support - Example Scripts - Wiki BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort KNOWN BUGS (last changed: 2020-02-09) None1 point -
As Melba23 pointed out $aRec is a string,, use something like _ArrayAdd to create an array or just use the $AllFilesFolder Array for example: #include <File.au3> #include <Array.au3> Local $FolderList = @ScriptDir Local $len = 259 Local $AllFilesFolder $AllFilesFolder = _FileListToArrayRec($FolderList, "*", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_SORT, $FLTAR_FULLPATH) If IsArray($AllFilesFolder) Then For $i = $AllFilesFolder[0] To 1 Step - 1 If StringLen($AllFilesFolder[$i]) <= $len Then _ArrayDelete($AllFilesFolder, $i) Next $AllFilesFolder[0] = UBound($AllFilesFolder) - 1 MsgBox(48,"Files folders length is more than 259", _ArrayToString($AllFilesFolder, @CRLF, 1)) ;No problem _ArrayDisplay($AllFilesFolder, " Files folders length is more than 259") ;problem! EndIf1 point
-
close, but it shows lack of basic debugging at all with your filewrite line in that much disrepair. **I only mention that so you dont feel slighted by others, because next time I call bad guy and the other folk can chime in with solutions. Case $idSaveitem Local $editcontent = guictrlread($idInput) FileWrite("Save.txt" , $editcontent)1 point
-
1 point
-
Automate Qt and QWidgets
kevinxauxa reacted to Jos for a topic
@kevinxauxa, I have removed the attachment because: prashannaa hasn't been on our forums for 4 years! We don't want to trust any binary/executable posted by somebody that just joined. Nothing personal, just common sense. Jos1 point -
zoel, Really? You said: and the Help file tells you this : GUICtrlRead: Read state or data of a control FileWrite: Write text/data to the end of a previously opened file which to me seems to be exactly what you asked for. So why do you feel those 2 functions are not what you need? M231 point
-
Font collor
zoel reacted to argumentum for a topic
my 2 cents #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> #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 Global $aWndPos Global $vDos, $sline = "" ; all these are a mess. The GUI looks better in a func, but, you'll choose better as you gain experience ;) Global $NetAs = GUICreate("NetAs-Network Assistant", 1096, 521, 182, 135) Global $idFilemenu = GUICtrlCreateMenu("&File") Global $idExititem = GUICtrlCreateMenuItem("Exit", $idFilemenu) Global $idSaveitem = GUICtrlCreateMenuItem("Save", $idFilemenu) Global $idInput = GUICtrlCreateEdit("", 168, 34, 921, 465) GUICtrlSetFont(-1, 10, 400, 0, "Courier") GUICtrlSetBkColor(-1, 0x0000FF) GUICtrlSetColor(-1, 0x00FFFF) Global $Button19 = GUICtrlCreateButton("Ping", 48, 416, 75, 25) Global $Button23 = GUICtrlCreateButton("Run", 656, 8, 73, 25) Global $Button24 = GUICtrlCreateButton("Clear", 576, 8, 75, 25) Global $Input1 = GUICtrlCreateInput("ping google.com", 736, 8, 345, 21) GUISetState(@SW_SHOW) Global $hENTER = GUICtrlCreateDummy() Global $AccelKeys[1][2] = [["{ENTER}", $hENTER]] ; Set accelerators GUISetAccelerators($AccelKeys) main() Func main() Local $sline, $vDos, $nMsg While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $idExititem GUIDelete($NetAs) Exit 0 Case $Button19 bttnState($GUI_DISABLE) ; no duble click or concurrent run GUICtrlSetData($idInput, ' ..pinging, this will take a moment.. ') ; let the user know wassup. GUICtrlSetData($idInput, _CmdInfo10() & @CRLF) _GUICtrlEdit_Scroll($idInput, $SB_SCROLLCARET) ; once is ok bttnState($GUI_ENABLE) Case $Button24 GUICtrlSetData($idInput, "") Case $Button23, $hENTER bttnState($GUI_DISABLE) ; no duble click or concurrent run $vDos = Run(@ComSpec & " /c " & GUICtrlRead($Input1), @TempDir, @SW_HIDE, $STDERR_MERGED) While 1 $sline &= StdoutRead($vDos) If @error Then ExitLoop If GUICtrlRead($idInput) <> $sline Then GUICtrlSetData($idInput, $sline) ; I like it this way =) WEnd GUICtrlSetData($idInput, $sline & @CRLF) ;~ GUICtrlSetData($Input1, "") ;----> Reset $sline = "" bttnState($GUI_ENABLE) EndSwitch WEnd EndFunc ;==>main Func bttnState($iState) GUICtrlSetState($Button19, $iState) GUICtrlSetState($Button23, $iState) GUICtrlSetState($Button24, $iState) GUICtrlSetState($Input1, $iState) EndFunc ;==>bttnState 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 ;==>_CmdInfo101 point -
How to save the output in a txt file
zoel reacted to argumentum for a topic
.. a good question. I'd say, try all of them, use the one you feel is better. Once you decided, share your code for the next guys and girls that may look for such an answer1 point -
hi, this is my password generator this is also my first GUI script here are some details of the script. Create passwords, Uppercase, LowerCase, Digits Only, Mixed, Mixed+Special chars Create Any number of password with any length. Easy to copy passwords to the clipboard. Well that's about it here is the script Your free to use the script as you wish. ;A password generator application ;By Ben Jones, Aka DreamVB #include <GUIConstantsEx.au3> #include <GuiEdit.au3> #include <ComboConstants.au3> #include <GuiComboBox.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ;Appliaction title message Const $Title = "Easy Password Generator" _ & @CRLF & " The easy way to make passwords." ;Create GUI Conponents $Form1 = GUICreate("Welcome", 337, 399, -1, -1) $lblPwsCount = GUICtrlCreateLabel("Number of passwords to make:", 8, 85, 150, 17) $txtPwsCount = GUICtrlCreateInput("8", 8, 101, 41, 21) $lblPwsLen = GUICtrlCreateLabel("How long should each password be?", 8, 133, 179, 17) $txtPwsLen = GUICtrlCreateInput("8", 8, 149, 41, 21) $lblPwsFmt = GUICtrlCreateLabel("Password Format:", 8, 181, 88, 17) $txtPasswords = GUICtrlCreateEdit("", 8, 251, 241, 137) GUICtrlSetData(-1, "") $cmdCopy = GUICtrlCreateButton("&Copy", 257, 283, 71, 25) $cmdAbout = GUICtrlCreateButton("&About", 257, 331, 71, 25) $cmdExit = GUICtrlCreateButton("E&xit", 258, 363, 71, 25) $cmdGen = GUICtrlCreateButton("Generate", 257, 252, 71, 25) $lblTitle = GUICtrlCreateLabel($Title, 22, 7, 290, 71, $SS_CENTER) GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS") GUICtrlSetColor(-1, 0xFFFF00) GUICtrlSetBkColor(-1, 0x0000FF) GUISetBkColor(0xFFFFFF) $cboFmt = GUICtrlCreateCombo("", 8, 200, 145, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Alpha Uppercase|Alpha Lowercase|Digits Only|Mixed Alpha/Digit|Mixed+Special", "Alpha Uppercase") $lblPasswrds = GUICtrlCreateLabel("Passwords:", 8, 230, 58, 17) GUISetState(@SW_SHOW) Local $pCount Local $LineCount Local $len Local $i Local $RetBuff Local $PwsFmt While 1 ;Get message $nMsg = GUIGetMsg() ;Deal with the messages. Switch $nMsg Case $GUI_EVENT_CLOSE, $cmdExit ExitLoop Case $GUI_EVENT_CLOSE, $cmdAbout MsgBox(64, "About", "Easy Password Generator" _ & @CRLF & "Version 1.1" _ & @CRLF & "By DreamVB" _ & @CRLF & @CRLF & "Designed in AutoIt") Case $GUI_EVENT_CLOSE, $cmdCopy ;Copy text to clipabord. ;Get length of the textbox $LineCount = _GUICtrlEdit_GetLineCount($txtPasswords) ;Check for text If ($LineCount > 0) Then ;Add text header For $i = 0 To $LineCount - 1 If ($i < $LineCount) Then $RetBuff = $RetBuff & _GUICtrlEdit_GetLine($txtPasswords, $i) & @CRLF EndIf Next ;Put text on clipboard. ClipPut($RetBuff) ;Clear up $RetBuff = "" $i = 0 EndIf Case $GUI_EVENT_CLOSE, $cboFmt ;Get password format. $PwsFmt = _GUICtrlComboBox_GetCurSel($cboFmt) Case $GUI_EVENT_CLOSE, $cmdGen ;Get number of passwords to make. $pCount = _GUICtrlEdit_GetLine($txtPwsCount, 2) ;Get the length of the password to make. $len = _GUICtrlEdit_GetLine($txtPwsLen, 2) ;Check for vaild password count. If Not StringIsDigit($pCount) Or $pCount = 0 Then MsgBox(48, "Error", "Invaild password count." & @CRLF & "Program will now exit.") ElseIf Not StringIsDigit($len) Or $len = 0 Then MsgBox(48, "Error", "Invaild password length" & @CRLF & "Program will now exit.") ControlFocus("","",$txtPwsLen) Else ;Header $RetBuff = $RetBuff & "+----------------------------+" & @CRLF $RetBuff = $RetBuff & "+ Your Passwords +" & @CRLF $RetBuff = $RetBuff & "+----------------------------+" & @CRLF ;Generate the passwords. For $i = 0 To $pCount - 1 If ($i < $pCount) Then ;Create password $RetBuff = $RetBuff & RandomPassword($len, $PwsFmt) & @CRLF EndIf Next ;Footer $RetBuff = $RetBuff & @CRLF & "Created by Easy Password Generator" ;Set text box with generated passwords. _GUICtrlEdit_SetText($txtPasswords, $RetBuff) $RetBuff = "" EndIf EndSwitch WEnd If GUIDelete($Form1) <> 1 Then MsgBox(16, "Error", "There was an error while exsiting..") Exit EndIf ;This function makes the random passwords Func RandomPassword($Length, $Fmt = 0) Local $buff Local $i Local $n Local Const $Alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Local Const $ADigits = "0123456789" Local Const $Special = "!#$%&'()*+,-./:;<=>?@[\]^_`{|}~" ;Password include file Local $pwsMask = "" ;Do password formatting Select Case $Fmt = 0 $pwsMask = $Alpha Case $Fmt = 1 $pwsMask = StringLower($Alpha) Case $Fmt = 2 $pwsMask = $ADigits Case $Fmt = 3 $pwsMask = $Alpha & StringLower($Alpha) & $ADigits Case $Fmt $pwsMask = $Alpha & StringLower($Alpha) & $ADigits & $Special EndSelect ;This creates the random password. For $i = 1 To $Length ;Pick a random chat between 1 and the pwsMask Length $n = Int(Random(1, StringLen($pwsMask))) ;Concat each chat that has been picked out of pwsMask to $buff $buff = $buff & StringMid($pwsMask, $n, 1) Next Return $buff EndFunc ;==>RandomPassword1 point
-
CRC32 question
argumentum reacted to guinness for a topic
I know rover answered this, but anyone that is using the beta version of AutoIt or WinAPIEx then you can use this >> #include <WinAPIEx.au3> ConsoleWrite(_CRC32(@ScriptFullPath) & @CRLF) Func _CRC32($sFilePath) ; By Yashied, modified by guinness. Local $hFileOpen = FileOpen($sFilePath, 0 + 16) If $hFileOpen = -1 Then Return SetError(1, 0, 0) EndIf Local $bData = FileRead($hFileOpen) FileClose($hFileOpen) Local $iLength = BinaryLen($bData), $tData If $iLength = 0 Then Return SetError(2, 0, 0) EndIf $tData = DllStructCreate('byte[' & $iLength & ']') DllStructSetData($tData, 1, $bData) Return Hex(_WinAPI_ComputeCrc32(DllStructGetPtr($tData), $iLength), 8) EndFunc ;==>_CRC321 point