Jump to content

richietheprogrammer

Active Members
  • Posts

    153
  • Joined

  • Last visited

Reputation Activity

  1. Like
    richietheprogrammer reacted to BrewManNH in Sort files by type?   
    Open Windows Explorer to any folder, set it up exactly how you'd like it to look, click the Tools menu, Folder Options, View tab, click the Apply to Folders button.
  2. Like
    richietheprogrammer reacted to AZJIO in Sort files by type?   
    #include <File.au3> #include <Array.au3> $aFileList = _FileListToArray(@DesktopDir, '*', 1) ; $aFileList =_FileListToArray(@HomeDrive, '*', 1) If @error Then Exit MsgBox(0, "", '@error = ' & @error) Local $aFileList_2D[$aFileList[0] + 1][2] For $i = 1 To $aFileList[0] $aFileList_2D[$i][0] = $aFileList[$i] $aFileList_2D[$i][1] = StringRegExpReplace($aFileList[$i], '^(?:.+?)(?:\.([^.\\]+))?$', '\1') Next ; _ArrayDisplay($aFileList_2D,"$aFileList_2D") _ArraySort($aFileList_2D, 0, 1, 0, 1) For $i = 1 To $aFileList[0] $aFileList[$i] = $aFileList_2D[$i][0] Next _ArrayDisplay($aFileList, "$aFileList")
  3. Like
    richietheprogrammer reacted to mikell in Sort files by type?   
    You should have a look at the helpfile before askingĀ 
    First try this
    $aFileList = _FileListToArray(@DesktopDir, '*', 1, 1) Then try _FileListToArrayRec() with the needed params
  4. Like
    richietheprogrammer reacted to water in OutlookEX UDF - Help & Support (II)   
    That's what I would have suggested next.
    Errotext "Invalid class string" looks like a problem with a corrupted registry key.
  5. Like
    richietheprogrammer reacted to water in OutlookEX UDF - Help & Support (II)   
    User JailDoctor hat a similar problem
    He tried to call another function but didn't notice that _OL_Open had returned an error. So please make sure you call _OL_Open at the start of you script and that it doesn't return an error.
  6. Like
    richietheprogrammer reacted to Xandy in 'Automating' the microphone   
    I piped the audio output to the mic input on my sound card (something like that anyway). Male to male connector and a y double female. Then I generated a phone number list, a mad-lib generator and called my friends all day with random computer voice and rate with my computer. I got some attention.

    EDIT: Oh yeah the Y was so I could still hook the stereo speakers into the audio output.
  7. Like
    richietheprogrammer reacted to blademonkey in Run consecutive commands based on return value?   
    looks like you're doing a @comspec /k which lingers and doesn't autoterminate. i believe you want to use /c not /k.
  8. Like
    richietheprogrammer reacted to Andreik in Remove all files except those with specific extension   
    #include <File.au3> $sDir = FileSelectFolder("Select","") If @error Then Exit $Counter = 1 $Files = _FileListToArray($sDir,"*",1) For $Index = 1 To $Files[0] If StringRight($Files[$Index],4) = ".doc" Then FileMove($sDir & "" & $Files[$Index],$sDir & "Document_" & $Counter & ".doc") ; Rename $Counter += 1 Else FileDelete($sDir & "" & $Files[$Index]) EndIf Next
  9. Like
    richietheprogrammer reacted to gcue in AD Get computer names + IP Addresses   
    actually doesnt seem to save too much time but here it is:


    #include <AD.au3> _AD_Open() If @error Then MsgBox(0, "", "unable to connect") Exit EndIf $aComputers2 = _AD_GetObjectsInOU("", "(objectclass=computer)") _AD_Close() Local $results[1][1] TCPStartup() For $i = 1 To UBound($aComputers2) - 1 $ip_address = TCPNameToIP($aComputers2[$i]) ReDim $results[UBound($results) + 1][2] $results[UBound($results) - 1][0] = $aComputers2[$i] $results[UBound($results) - 1][1] = $ip_address ConsoleWrite($aComputers2[$i] & @CRLF) ConsoleWrite($ip_address & @CRLF) ConsoleWrite(@CRLF) Next TCPShutdown() _ArrayDisplay($results)
  10. Like
    richietheprogrammer reacted to gcue in AD Get computer names + IP Addresses   
    you can get ad.au3 from here




    #include <AD.au3> Global $aComputers2 _AD_Open() If @error Then MsgBox(0, "", "unable to connect") Exit EndIf $aComputers2 = _AD_GetObjectsInOU("", "(objectclass=computer)", 2, "name,operatingSystem") _AD_Close() Local $results[1][1] TCPStartup() For $i = 1 To UBound($aComputers2) - 1 $ip_address = TCPNameToIP($aComputers2[$i][0]) ReDim $results[UBound($results) + 1][3] $results[UBound($results) - 1][0] = $aComputers2[$i][0] $results[UBound($results) - 1][1] = $aComputers2[$i][1] $results[UBound($results) - 1][2] = $ip_address Next TCPShutdown() _ArrayDisplay($results)
  11. Like
    richietheprogrammer reacted to gcue in AD Get computer names + IP Addresses   
    Success: Returns string containing IP address corresponding to the name.

    not array
  12. Like
    richietheprogrammer reacted to Melba23 in _arraysearch FindAll?   
    richietheprogrammer,

    Try changing the <<<<<<<<<<<<<<<<<<<<< line:

    #include <Array.au3> ; Declare an array to hold the instances Global $aListing[1][3] =[[0, 0, 0]] ; Simulate a CSV file $sCSV = "black colour,colour black,black cat,not_matched,blackbird,shoeblack" ; Define the test string to search for $sTest = "black" ; Start looking $iOffset = 1 While 1 ; Find next instance of the test string StringRegExp($sCSV, "(?i)" & $sTest, 1, $iOffset) If @error Then ExitLoop EndIf ; Note the point at which the next search should start $iOffset = @extended ; Now move back to the comma at the beginning of the word or the start of the string $iStart = $iOffset ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< While 1 $iStart -= 1 If $iStart = 0 Or StringMid($sCSV, $iStart, 1) = "," Then $iStart += 1 ExitLoop EndIf WEnd ; And now forward to the comma at the end of the word or the end of the string $iEnd = $iOffset - 1 While 1 $iEnd += 1 If $iEnd > StringLen($sCSV) Or StringMid($sCSV, $iEnd, 1) = "," Then $iEnd -= 1 ExitLoop EndIf WEnd ; Add to list $aListing[0][0] += 1 ReDim $aListing[$aListing[0][0] + 1][3] $aListing[$aListing[0][0]][0] = StringMid($sCSV, $iStart, $iEnd - $iStart + 1) $aListing[$aListing[0][0]][1] = $iStart $aListing[$aListing[0][0]][2] = $iEnd WEnd _ArrayDisplay($aListing) That works for me.

    M23
×
×
  • Create New...