Leaderboard
Popular Content
Showing content with the highest reputation on 11/20/2014 in all areas
-
This project has been discontinued! Here a small tool I wrote to update my Sysinternal tools collection without the need to download always the whole package or visiting the site to check for updates. I know that there are several tools available (also some tools written in AutoIt) but here another one for the collection. It was good exercise for me to code it. Some files from the live web site cannot be downloaded although they are visible! Here the download link of the source code only: AutoIt Sysinternal Tools Synchronizer v0.99.6 build 2020-09-23 beta.7z (1557 downloads previously) -=> Requires AutoIt version 3.3.13.20 or higher / tested on Win8.1 real machine and some VMs: Win7 / Vista / Win10 Compiled exe only: @MediaFire Just select the Sysinternal Tools folder or create one and press the synchronize button to download the selected items. Click on AutoIt label (near to left upper corner) to open menu. Special thanks to LarsJ, Melba23 and mesale0077 for their help. I've still some ideas to implement which are more gimmick related, so it is not finished yet... If you want to add your language please check out #Region Language. Thanks. Please report any bug or if you have any suggestions. The language of the tool tip from each of the executable in the left list view were automatically created using Google translator and weren't checked for correctness. Br, UEZ1 point
-
Here's another way of combining all of the files into one before processing. Run(@ComSpec & ' /k copy "' & $xml_path_in & '* ' & $$xml_path_out & 'NewFile.csv', "", @SW_HIDE) This way you only have to process the file once instead of 30,000 times opening and closing files. Plus in the latest release version of _FileReadToArray can do the CSV splitting internally.1 point
-
I just noticed that you use the old Excel UDF. If possible update to the latest version of AutoIt. The new Excel UDF that comes witjh this new version allows to write a single cell, a 1D array or a 2D array with function _Excel_RangeWrite. This function is about 20 to 100 times faster compared to the old _ExcelWriteCell.1 point
-
I would disagree that it's all that clear, in that I think it shouldn't just be mentioned in some obscure part of the help file. that information should be linked to the word "filename" in every function that uses it in the help file. We have links to practically everything else in there now, this should definitely be there as well. I've used AutoIt for over 4 years, and I've never read that section of the help file, it might be a new addition which is why I haven't read it before. Maybe I'll take a look at that this week and see what's practical.1 point
-
Needs to be: $read = StringReplace($read, '"', '')1 point
-
jguinch, This has been discussed before and is the result of _FileListToArray passing the filter directly to Windows to search for the files while _FileListToArrayRec looks through all files and uses a RegEx to extract those that match the filter. Hence the discrepancy when the filter for the latter function holds a "." - the Regex will only match a name which includes a "." while Windows is far less fussy. As explained in the linked thread, we see this as a Windows "feature/bug" rather then an AutoIt problem - and we certainly have no intention of changing the behaviour of either function. I added some remarks to the Help file explaining the difference between the 2 functions - did you read them? I will be closing the bug report - please use this thread if you wish to discuss it further. M23 Edit: 22k1 point
-
Simpliest Question of the day
SorryButImaNewbie reacted to junkew for a topic
Until (WinExists("Információ", "Sikeres jegyvásárlás!")) or ($i=0)1 point -
Simpliest Question of the day
SorryButImaNewbie reacted to water for a topic
Then Exit when $i < 0. If WinExists("Információ", "Elérte a maximális napi vásárlási mennyiséget! ( 2 )") Then Do WinKill("Információ", "Elérte a maximális napi vásárlási mennyiséget! ( 2 )") $i = $i - 1 If $i < 0 Then ExitLoop ControlFocus($handle, "", "TEdit1") Send("{CTRLDOWN}v{CTRLUP}") ControlClick($handle, "", "[CLASSNN:TAdvBitBtn23]") Sleep(1000) ;WinWaitActive("Befizetés") Local $handle3 = WinGetHandle("Befizetés") ControlSend($handle3, "", "[CLASSNN:TComboBox3]", "ü{ENTER}") ControlSend($handle3, "", "[CLASSNN:TEdit5]", $arrayEuroShell[$i]) ControlClick($handle3, "", "[CLASSNN:TBitBtn2]") Sleep(1000) Until WinExists("Információ", "Sikeres jegyvásárlás!") EndIf1 point -
@Melba : as usual, I read too fast... So, for registry entries my suggest is not good to... You can maybe look at >_RegEnumKeyEx for this1 point
-
I think it should be useful ; #FUNCTION# =============================================================================== ; Name...........: _ProcessGetPath( ; Description ...: Retrieves a process file path ; Syntax.........: _ProcessGetPath($vProcess) ; Parameters ....: $vProcess - PID or name of a process ; Requirements...: kernel32.dll, psapi.dll ; Return values .: Success - A full process path ; @error = 0 ; Failure - Empty string ; @error = 1 - Invalid process name/PID ; @error = 2 - kernel32.dll failed to open (wrong version?) ; @error = 3 - Could not OpenProcess ; @error = 4 - psapi.dll failed to open (doesn't exist?) ; @error = 5 - returned path is empty or invalid ; Author ........: JScript, Larry, SmOke_N ; Modified.......: mrRevoked - reformated, error checking ; Remarks .......: ; Related .......: ; Link ..........; ; Example .......; ; ============================================================================================ Func _ProcessGetPath($vProcess) Local $i_PID, $hKernel32, $hPsapi, $aProcessHandle, $tDLLStruct, $iError, $sProcessPath $i_PID = ProcessExists($vProcess) If Not $i_PID Then Return SetError(1, 0, "");process doesn't exist? $hKernel32 = DllOpen("Kernel32.dll") $iError = @error If $iError Then DllClose($hKernel32) Return SetError(2, $iError, ""); dllopen kernell32.dll failed EndIf $aProcessHandle = DllCall($hKernel32, "int", "OpenProcess", "int", 0x0400 + 0x0010, "int", 0, "int", $i_PID) $iError = @error If $iError Or $aProcessHandle[0] = 0 Then DllClose($hKernel32) Return SetError(2, $iError, "");openprocess failed EndIf $hPsapi = DllOpen("Psapi.dll") $iError = @error If $iError Then DllClose($hKernel32) DllClose($hPsapi) Return SetError(3, $iError, ""); dllopen psapi.dll failed EndIf $tDLLStruct = DllStructCreate("char[1000]") DllCall($hPsapi, "long", "GetModuleFileNameEx", "int", $aProcessHandle[0], "int", 0, "ptr", DllStructGetPtr($tDLLStruct), "long", DllStructGetSize($tDLLStruct)) $iError = @error DllCall($hKernel32, "int", "CloseHandle", "int", $aProcessHandle[0]) DllClose($hKernel32) DllClose($hPsapi) If $iError Then $tDLLStruct = 0 Return SetError(4, $iError, "");GetModulefilenamex failed EndIf $sProcessPath = DllStructGetData($tDLLStruct, 1) $tDLLStruct = 0 ;format the output If StringLen($sProcessPath) < 2 Then Return SetError(5, 0, "");is empty or non readable If StringLeft($sProcessPath, 4) = "\??\" Then $sProcessPath = StringReplace($sProcessPath, "\??\", "") If StringLeft($sProcessPath, 20) = "\SystemRoot\System32" Then $sProcessPath = StringReplace($sProcessPath, "\SystemRoot\System32", @SystemDir) Return SetError(0, 0, $sProcessPath) EndFunc ;==>_ProcessGetPath EDIT: or this one: #include <WinAPIProc.au3> _WinAPI_GetProcessFileName ( [$iPID = 0] )1 point
-
MikahS, Glad it was your code at fault and not mine - much easier to fix that way! M231 point
-
For me is working correctly. try again. saludos edit: Look the ported example: Func AnonFilesUpload($Filepath) Local $sServerURL="https://anonfiles.com/api/hotlink" Local $boundary = "--------Boundary" Local $Postdata = "--" & $boundary & @crlf & _ "Content-Disposition: form-data; name=" & Chr(34) & "file" & Chr(34) & "; filename=" & Chr(34) & filename($filepath) & Chr(34) & @crlf & _ "Content-Type: application/octet-stream" & @crlf & @crlf & _ Fileread("1.txt") & @crlf & _ "--" & $boundary & "--" & @crlf Local $oHTTP = ObjCreate('winhttp.winhttprequest.5.1') $oHTTP.Open("POST", $sServerURL, false) $oHTTP.SetRequestHeader("Content-Type", "multipart/form-data; " & "boundary=" & $boundary) $oHTTP.Send($Postdata) $oHTTP.WaitForResponse() $hotlink=$oHTTP.ResponseText $hotlink=StringRegExpReplace(stringmid($hotlink,StringInStr($hotlink,"https")),'[/"}]',"") Return $hotlink EndFunc Func filename($filepath) Local $file=StringSplit($filepath,"\") Return $file[(ubound($file)-1)] EndFunc saludos1 point