Leaderboard
Popular Content
Showing content with the highest reputation on 01/26/2019 in all areas
-
Code Optimization (specifically memory usage)
mitchell12388 and one other reacted to TheXman for a topic
The reason your memory keeps rising is because you are creating a new file handle with each iteration through your loop. FileOpen returns a handle to your file. That handle is used by the FileClose. Your FileClose was failing because it expected, as its parameter, the handle created by the FileOpen, not a file name. If you were going to use FileOpen, then your FileWriteLine functions should have been using the file handle, not the file name. I know that it can be a little confusing when you are first starting out. Your script is only writing to the file once every 60 seconds. So you can just let the FileWriteLine open and close the file automatically by supplying the file name instead of a handle (like you were already doing). Change your script to something like this and see if the memory keeps creeping up or not. Also, I modified the logic to only create the date and time values once per iteration. I left the rest of the logic alone. Opt("TrayAutoPause", 0) If FileExists("C:\NetLog\") = 0 Then DirCreate("C:\Netlog") EndIf While 1 $dt = @MON & "-" & @MDAY & "-" & @YEAR $hms = @HOUR & ":" & @MIN & ":" & @SEC $b = "NA" $a = Ping("1.1.1.1") If $a = 0 Then $b = Ping("8.8.8.8") If $b = 0 Then FileWriteLine("C:\NetLog\Net " & $dt & ".txt", "FAILED " & $dt & " " & $hms) EndIf Else FileWriteLine("C:\NetLog\Net " & $dt & ".txt", "MS: A=" & $a & " B=" & $b & " " & $dt & " " & $hms) EndIf Sleep(60000) WEnd If you wanted to use the FileOpen way of doing things, then it would look something like this: Opt("TrayAutoPause", 0) If FileExists("C:\NetLog") = 0 Then DirCreate("C:\Netlog") EndIf While 1 $dt = @MON & "-" & @MDAY & "-" & @YEAR $hms = @HOUR & ":" & @MIN & ":" & @SEC $b = "NA" $a = Ping("1.1.1.1") $hFile = FileOpen("C:\NetLog\Net " & $dt & ".txt", 1) If $a = 0 Then $b = Ping("8.8.8.8") If $b = 0 Then FileWriteLine($hFile, "FAILED " & $dt & " " & $hms) EndIf Else FileWriteLine($hFile, "MS: A=" & $a & " B=" & $b & " " & $dt & " " & $hms) EndIf FileClose($hFile) Sleep(60000) WEnd2 points -
image Search inactive window ,but not minimized.
totta_fadil reacted to ibrahem for a topic
this is a UDF to make image search on inactive window, but not minimized. using it, you can seach for coords of an image so that you can use ControlClick to click on it in Background while you are watching a movie or doing something else on the screen. i am not who made this UDF . i only fixed some bugs on it : it wasn't able to run on 64 bit : so i added #AutoIt3Wrapper_UseX64=NO it looked for the top left of the image : so i made it find the height \ 2 and the width \ 2 of the image and add them to the Coords so the Coords will be at the middle of the image ... here is the UDF : imageSearchEX.au3 BmpSearch.au3 here is an example : #AutoIt3Wrapper_UseX64=NO ;because ImageSearchEX doesn't run on 64 bit #include <imageSearchEX.au3> $imageSearchEX = imageSearchEX ; this is to make it easy to write the name of the func ^_^ $Win = "..." ;the name or class of requested window $Image = "..." ;the path to the image you want to look for > it must be 24-bit Bitmap....and remember the more the image is small the faster you find it $_$.... ;you can use snipping tool .exe to capture it and use paint .exe to save it as 24-bit Bitmap $p= $imageSearchEX($Win,$Image) if $p=0 Then ; what to do if image was not exists MsgBox(0,"","Image Doesn't exist") EndIf _ArrayDisplay($p) ; you can delete this line >> as it only shows you the Coords of the image on the window ControlClick($Win,"leave it blank","the control you want to click","primary ...or the button you want to click","Number of clicks",$p[0],$p[1]) #cs ;If you want to test it on the screen using MouseClick or Mouse move ...etc $WinSize= WinGetPos("(Frozen) AutoIt v3 Window Info") MouseMove($p[0] + $WinSize[0],$p[1] + $WinSize[1],1) #ce and here are some functions to make it easy to use this UDF : #AutoIt3Wrapper_UseX64=NO #include <imageSearchEX.au3> Global $imageSearchEX = imageSearchEX Global $FAC = FindAndClick Global $WUA = WaitUntilAppear Global $WUATC = WaitUntilAppearThenClick Func FindAndClick($Window,$Image,$Control) ;~ This function is to find an image that is surely on the window when this function is called $coords = $imageSearchEX($Window,$Image) ControlClick($Window,"",$Control,"primary",1,$coords[0],$coords[1]) EndFunc Func WaitUntilAppear($Window,$Image,$Control) ;~ This function is to pause the script until an image is found on the window While 1 $coords = $imageSearchEX($Window,$Image) If Not $coords = 0 Then ExitLoop Sleep(50) WEnd EndFunc Func WaitUntilAppearThenClick($Window,$Image,$Control) ;~ This function is to pause the script until an image is found on the window then click on that image While 1 $coords = $imageSearchEX($Window,$Image) If Not $coords = 0 Then ControlClick($Window,"",$Control,"primary",1,$coords[0],$coords[1]) ExitLoop EndIf Sleep(50) WEnd EndFunc GAMERS - Asking for help with ANY kind of game automation is against the forum rules. DON'T DO IT. Sorry for bad English1 point -
I agree p.s. accuracy is not my specialty....1 point
-
#include <Array.au3> #include <EditConstants.au3> #include <File.au3> #include <GUIConstantsEx.au3> #include <GuiEdit.au3> Global $sFileSelectFolder, $aFolderPaths Global $sKeepDir = "00000000000" Global $sIniFile = @ScriptDir & "\Folders.ini" Global $gLogFile = @ScriptDir & "\Deleted.ini" Global $FileLog = FileOpen($gLogFile, 1) Global $aDirList _FileReadToArray($sIniFile, $aDirList, 0) If @error Then Exit MsgBox(0,"Error","Error Reading Path!") $aDirList[0] = UBound($aDirList) - 1 #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form", 590, 419, 268, 226) GUISetBkColor(0xD7D7D2) $Input = GUICtrlCreateInput("", 16, 50, 385, 20) GUICtrlSetState($Input, $GUI_DISABLE) $Fpath = GUICtrlCreateButton("Path Folder", 400, 48, 89, 25) $Fdelte = GUICtrlCreateButton("Folder Delete", 498, 48, 89, 25) $LogView = GUICtrlCreateButton("Log Viewer", 14, 368, 97, 33) $ExitBut = GUICtrlCreateButton("Close", 497, 368, 89, 33) $g_idEdit = GUICtrlCreateEdit("", 17, 75, 568, 290, BitOr($GUI_SS_DEFAULT_EDIT, $ES_READONLY)) _GUICtrlEdit_SetLimitText($g_idEdit, 64000) _GUICtrlEdit_LineScroll($g_idEdit, 0, _GUICtrlEdit_GetLineCount($g_idEdit)) GUICtrlSetColor($g_idEdit, 0x5B0000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $ExitBut Exit Case $LogView ShellExecute($gLogFile) Case $Fpath $sFileSelectFolder = FileSelectFolder("Select for your Folder-Source!", "::{7be9d83c-a729-4d97-b5a7-1b7313c39e0a}") If @error Then MsgBox(64, "Warning", "No folder was selected.") Back() Else GUICtrlSetData($Input, $sFileSelectFolder) GUICtrlSetState($Input, $GUI_Disable) EndIf Case $Fdelte $sInput = GUICtrlRead($Input) If FileExists($sInput) = 0 Then ContinueLoop MsgBox(4096, "Error", "Unable to find path: " & $sInput) $aFolderPaths = _FileListToArrayRec($sInput, _ArrayToString($aDirList, "*;", 1, -1, "*;", 0, 0) & "*", 2, 0, 0, 2) If @error Then ContinueLoop MsgBox(4096, "Error", "Error: " & _FileListToArrayError(@error)) For $i = 1 To $aFolderPaths[0] If FileExists($aFolderPaths[$i]) Then $aSubFolders = _FileListToArrayRec($aFolderPaths[$i], "*|" & $sKeepDir & "*", 2, 0, 0, 0) If @error Then ContinueLoop For $j = 1 To $aSubFolders[0] If StringLeft($aSubFolders[$j], StringLen($sKeepDir)) = $sKeepDir Then ContinueLoop ;~ Shouldn't exist as it's already filtered out. $_sLogData = "Delete: " & $aFolderPaths[$i] & "\" & $aSubFolders[$j] _GUICtrlEdit_AppendText ($g_idEdit, $_sLogData & @CRLF) DirRemove($aFolderPaths[$i] & "\" & $aSubFolders[$j], 1) Next EndIf Next FileWrite($FileLog, "Username: " & @UserName & @CRLF & "ProcessDate: " & @MON & "/" & @MDAY & "/" & @YEAR & @CRLF & "Time: " & @HOUR & ":" & @MIN & ":" & @SEC & @CRLF & "====================" & @CRLF & GUICtrlRead($g_idEdit) &@CRLF& "===================="& @CRLF) MsgBox(0,"Completed","Done Processing!") Back() EndSwitch WEnd Func Back() Return EndFunc Func _FileListToArrayError($iError) Local $sError Switch $iError Case 1 $sError = "Path not found or invalid" Case 2 $sError = "Invalid Include parameter" Case 3 $sError = "Invalid Exclude parameter" Case 4 $sError = "Invalid Exclude_Folders parameter" Case 5 $sError = "Invalid $iReturn parameter" Case 6 $sError = "Invalid $iRecur parameter" Case 7 $sError = "Invalid $iSort parameter" Case 8 $sError = "Invalid $iReturnPath parameter" Case 9 $sError = "No files/folders found" Case Else $sError = "Unknown" EndSwitch Return $sError EndFunc1 point
-
Help With StringSplit
pixelsearch reacted to FrancescoDiMuro for a topic
@AutoPM You can use SRE too: #include <Array.au3> #include <StringConstants.au3> Global $arrStrings[5] = ["//www.autoitscript.com/forum/forum/2-autoit-general-help-and-support/", _ "www.autoitscript.com/forum/forum/2-autoit-general-help-and-support/", _ "www.abcd.efgh.com/", _ "//www.somethingelse.com.de.eu.com/abcdefgh", _ "www.a.b.c.d.e.f.g.h.com/something/somethingelse/anythingelse"], _ $strPattern = "^(?:\/\/)?([^\/]+)(?:\/)(.+)$", _ $arrResult For $strString In $arrStrings $arrResult = StringRegExp($strString, $strPattern, $STR_REGEXPARRAYGLOBALMATCH) _ArrayDisplay($arrResult) Next1 point -
[Solved] Delete subfolders from a selected folders
KickStarter15 reacted to Subz for a topic
Example: #include <Array.au3> #include <File.au3> Global $bExample = True Global $sRootDir = @ScriptDir & "\Example", $sKeepDir = "00000000000" Global $sIniFile = @ScriptDir & "\Folders.ini" Global $aDirList = IniReadSection($sIniFile, "Folders") If @error And $bExample Then _ExampleFolders() ElseIf @error Then Exit EndIf Global $aFolderPaths = _FileListToArrayRec($sRootDir, _ArrayToString($aDirList, "*;", 1, -1, "*;", 0, 0) & "*", 2, 0, 0, 2) If @error Then Exit For $i = 1 To $aFolderPaths[0] If FileExists($aFolderPaths[$i]) Then $aSubFolders = _FileListToArrayRec($aFolderPaths[$i], "*|" & $sKeepDir & "*", 2, 0, 0, 0) If @error Then ContinueLoop For $j = 1 To $aSubFolders[0] If StringLeft($aSubFolders[$j], StringLen($sKeepDir)) = $sKeepDir Then ContinueLoop ;~ Shouldn't exist as it's already filtered out. SplashTextOn("Removing Subfolders", "Delete: " & $aFolderPaths[$i] & "\" & $aSubFolders[$j], 800, 45, Default, Default, Default, Default, 11) DirRemove($aFolderPaths[$i] & "\" & $aSubFolders[$j], 1) Next EndIf Next ;~ --------------- Create Demo Folders --------------- ~; Func _ExampleFolders() Local $sFolderPath For $i = 0 To 9 $sSubLvl1 = _RandomFolder() If Random(0, 1, 1) = 1 Then IniWrite($sIniFile, "Folders", $sSubLvl1, "") $sSubLvl1 &= " " & _RandomFolder() EndIf For $j = 0 To 9 $sSubLvl2 = FileExists($sRootDir & "\" & $sSubLvl1 & "\" & $sKeepDir & " 000000~1") ? _RandomFolder() : $sKeepDir & " 000000~1" $sFolderPath = $sRootDir & "\" & $sSubLvl1 & "\" & $sSubLvl2 DirCreate($sFolderPath) Next Next $aDirList = IniReadSection($sIniFile, "Folders") EndFunc Func _RandomFolder() Local $sFolder = "" For $j = 1 To Random(5, 10, 1) $sFolder &= Chr(Random(65, 90, 1)) Next Return $sFolder EndFunc1 point -
I used _BmpSearch quite often. And I made some changes to improve usability: now it is not a UDF, but a function now the function accepts not only gdi32 hBitmap, but also GDI+ hImage or simply path to image file now there is no problem with the alpha channel now you can search for a 1x1 pixel image and get array of pixels now the search time is returned to the $aCoords[0][1] in milliseconds added error checking #include <GDIPlus.au3> #pragma compile(x64, false) ; #FUNCTION# ==================================================================================================================== ; Name : _BmpSearchEx ; Description : Searches for Bitmap in a Bitmap ; Syntax : _BmpSearchEx($vPic1, $vPic2, $iMax = 5000) ; Parameters : $vPic1 - Handle to bitmap (gdi32 or GDI+) to search or path to image file ; : $vPic2 - Handle to bitmap (gdi32 or GDI+) to find or path to image file ; : $iMax - Max matches to find ; Return values : Success: Returns a 2d array with the following format: ; : $aCoords[0][0] = Total matches found (0 if not found) ; : $aCoords[0][1] = Time of search in ms ; : $aCoords[$i][0] = Width of bitmap ; : $aCoords[$i][1] = Height of bitmap ; : $aCoords[$i][2] = X coordinate ; : $aCoords[$i][3] = Y coordinate ; : Failure: Returns 0 and sets @error: ; : @error = 1 - file $vPic1 not found ; : @error = 2 - file $vPic2 not found ; : @error = 3 - $vPic1 is not a bitmap ; : @error = 4 - $vPic2 is not a bitmap ; : @error = 5 - error decode opcode ; Author : Brian J Christy (Beege) ; Modified : InnI ; =============================================================================================================================== Func _BmpSearchEx($vPic1, $vPic2, $iMax = 5000) If $iMax < 1 Then $iMax = 5000 Local $hImg1, $hImg2, $iErr1, $iErr2, $iTime = TimerInit() _GDIPlus_Startup() If IsString($vPic1) Then If Not FileExists($vPic1) Then Return SetError(1, _GDIPlus_Shutdown(), 0) $hImg1 = _GDIPlus_BitmapCreateFromFile($vPic1) Else $hImg1 = _GDIPlus_BitmapCreateFromHBITMAP($vPic1) $iErr1 = @error EndIf If IsString($vPic2) Then If Not FileExists($vPic2) Then Return SetError(2, _GDIPlus_Shutdown(), 0) $hImg2 = _GDIPlus_BitmapCreateFromFile($vPic2) Else $hImg2 = _GDIPlus_BitmapCreateFromHBITMAP($vPic2) $iErr2 = @error EndIf $hSource = ($iErr1) ? _GDIPlus_BitmapCreateHBITMAPFromBitmap($vPic1) : _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg1) If Not $iErr1 Then _GDIPlus_BitmapDispose($hImg1) $hFind = ($iErr2) ? _GDIPlus_BitmapCreateHBITMAPFromBitmap($vPic2) : _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg2) If Not $iErr2 Then _GDIPlus_BitmapDispose($hImg2) _GDIPlus_Shutdown() Static Local $aMemBuff, $tMem, $fStartup = True If $fStartup Then ;####### (BinaryStrLen = 490) #### (Base64StrLen = 328 )##################################################################### Local $Opcode = 'yBAAAFCNRfyJRfSNRfiJRfBYx0X8AAAAAItVDP8yj0X4i10Ii0UYKdiZuQQAAAD38YnBi0X4OQN0CoPDBOL36akAAACDfSgAdB1TA10oO10YD4OVAAAAi1UkORN1A1vrBluDwwTrvVOLVSyLRTADGjtdGHd3iwg5C3UhA1oEi0gEO10Yd2Y5C3USA1oIi0gIO10Yc1c5' & _ 'C3UDW+sGW4PDBOuCi1UUid6LfQyLTRCJ2AHIO0UYczfzp4P5AHcLSoP6AHQNA3Uc6+KDwwTpVP///4tFIIkYg0UgBIPDBP9F/ItVNDlV/HQG6Tj///9bi0X8ycIwAA==' Local $aDecode = DllCall("Crypt32.dll", "bool", "CryptStringToBinary", "str", $Opcode, "dword", 0, "dword", 1, "struct*", DllStructCreate("byte[254]"), "dword*", 254, "ptr", 0, "ptr", 0) If @error Or (Not $aDecode[0]) Then Return SetError(5, 0, 0) $Opcode = BinaryMid(DllStructGetData($aDecode[4], 1), 1, $aDecode[5]) $aMemBuff = DllCall("kernel32.dll", "ptr", "VirtualAlloc", "ptr", 0, "ulong_ptr", BinaryLen($Opcode), "dword", 4096, "dword", 64) $tMem = DllStructCreate('byte[' & BinaryLen($Opcode) & ']', $aMemBuff[0]) DllStructSetData($tMem, 1, $Opcode) ;############################################################################################################################ $fStartup = False EndIf Local $tSizeSource = _WinAPI_GetBitmapDimension($hSource) If @error Then Return SetError(3, 0, 0) Local $tSizeFind = _WinAPI_GetBitmapDimension($hFind) If @error Then Return SetError(4, 0, 0) Local $iRowInc = ($tSizeSource.X - $tSizeFind.X) * 4 Local $tSource = DllStructCreate('dword[' & ($tSizeSource.X * $tSizeSource.Y) & ']') _WinAPI_GetBitmapBits($hSource, DllStructGetSize($tSource), DllStructGetPtr($tSource)) Local $tFind = DllStructCreate('dword[' & ($tSizeFind.X * $tSizeFind.Y) & ']') _WinAPI_GetBitmapBits($hFind, DllStructGetSize($tFind), DllStructGetPtr($tFind)) _WinAPI_DeleteObject($hSource) _WinAPI_DeleteObject($hFind) ;####### (BinaryStrLen = 106) ################################################################################################# Static Local $Opcode_ = '0xC80000008B5D0C8B1383C3048B4D103913750C83C304E2F7B800000000EB118B5508FF338F028B451029C883C002EB00C9C20C00' Static Local $aMemBuff_ = DllCall("kernel32.dll", "ptr", "VirtualAlloc", "ptr", 0, "ulong_ptr", BinaryLen($Opcode_), "dword", 4096, "dword", 64) Static Local $tMem_ = DllStructCreate('byte[' & BinaryLen($Opcode_) & ']', $aMemBuff_[0]) DllStructSetData($tMem_, 1, $Opcode_) ;############################################################################################################################## Local $iFirstDiffIdx, $iFirstDiffPix, $aFirstDiffCoords[2], $iMaxLoops = (DllStructGetSize($tFind) / 4) - 1 If $iMaxLoops Then Local $aFD = DllCallAddress('dword', DllStructGetPtr($tMem_), 'dword*', 0, 'struct*', $tFind, 'dword', $iMaxLoops) $iFirstDiffIdx = $aFD[0] $iFirstDiffPix = $aFD[1] Else $iFirstDiffIdx = 1 $iFirstDiffPix = DllStructGetData($tFind, 1, 1) EndIf $aFirstDiffCoords[1] = Int(($iFirstDiffIdx - 1) / $tSizeFind.X) $aFirstDiffCoords[0] = ($iFirstDiffIdx - 1) - ($aFirstDiffCoords[1] * $tSizeFind.X) Local $iFirst_Diff_Inc = (($aFirstDiffCoords[1] * $tSizeSource.X) + $aFirstDiffCoords[0]) * 4 If $iFirst_Diff_Inc < 0 Then $iFirst_Diff_Inc = 0 Local $tCornerPixs = DllStructCreate('dword[3]') DllStructSetData($tCornerPixs, 1, DllStructGetData($tFind, 1, $tSizeFind.X), 1) DllStructSetData($tCornerPixs, 1, DllStructGetData($tFind, 1, $tSizeFind.X * ($tSizeFind.Y - 1) + 1), 2) DllStructSetData($tCornerPixs, 1, DllStructGetData($tFind, 1, $tSizeFind.X * $tSizeFind.Y), 3) Local $tCornerInc = DllStructCreate('dword[3]') DllStructSetData($tCornerInc, 1, ($tSizeFind.X - 1) * 4, 1) DllStructSetData($tCornerInc, 1, (($tSizeSource.X - $tSizeFind.X) + $tSizeSource.X * ($tSizeFind.Y - 2) + 1) * 4, 2) DllStructSetData($tCornerInc, 1, ($tSizeFind.X - 1) * 4, 3) Local $pStart = DllStructGetPtr($tSource) Local $iEndAddress = Int($pStart + DllStructGetSize($tSource)) Local $tFound = DllStructCreate('dword[' & $iMax & ']') Local $ret = DllCallAddress('dword', DllStructGetPtr($tMem), 'struct*', $tSource, 'struct*', $tFind, _ 'dword', $tSizeFind.X, 'dword', $tSizeFind.Y, _ 'dword', $iEndAddress, 'dword', $iRowInc, 'struct*', $tFound, _ 'dword', $iFirstDiffPix, 'dword', $iFirst_Diff_Inc, _ 'struct*', $tCornerInc, 'struct*', $tCornerPixs, _ 'dword', $iMax) Local $aCoords[$ret[0] + 1][4] = [[$ret[0], Round(TimerDiff($iTime))]] If Not $ret[0] Then Return SetError(0, 0, $aCoords) For $i = 1 To $ret[0] $iFoundIndex = ((DllStructGetData($tFound, 1, $i) - $pStart) / 4) + 1 $aCoords[$i][3] = Int(($iFoundIndex - 1) / $tSizeSource.X) $aCoords[$i][2] = ($iFoundIndex - 1) - ($aCoords[$i][3] * $tSizeSource.X) $aCoords[$i][0] = $tSizeFind.X $aCoords[$i][1] = $tSizeFind.Y Next $aCoords[0][1] = Round(TimerDiff($iTime)) Return SetError(0, 0, $aCoords) EndFunc ;==>_BmpSearchEx1 point
-
Hi, Can I just clarify that a bit. The ControlIDs are actually the index numbers to an internal AutoIt array which holds details of the actual control - that way AutoIt can use the related handle to action the correct API call. Normally the ControlIDs are in numerical succession starting at 3 (0-2 are reserved), but the internal algorithm actually looks for the first available entry in this array, so deleting previously created controls can leave "holes" which will be filled first. A lot of people, including myself I am afraid to say, use the successive nature of ControlIDs to run loops when altering groups of controls. This is not good coding practice and you should really use an array to hold the returned values to cater for the possibility that they are not successive. I hope that explains it clearly - please come back if not. M231 point
-
Purpose (MSDN - Windows Internet) The Microsoft Windows Internet (WinINet) application programming interface (API) enables applications to access standard Internet protocols, such as FTP, Gopher, and HTTP. For ease of use, WinINet abstracts these protocols into a high-level interface. Download WinINet_2010_01_02.zip - Minor tweaks WinINet_2008_09_13.zip - Added _WinINet_Shutdown - Added _WinINet_Startup - Fixed _WinINet_CreateUrlCacheGroup - Fixed _WinINet_FindFirstUrlCacheEntryEx - Fixed _WinINet_FindNextUrlCacheEntryEx - Fixed _WinINet_FtpCommand - Fixed _WinINet_InternetFindNextFile - Fixed _WinINet_SetUrlCacheEntryGroup - Changed _WinINet_GetUrlCacheGroupAttribute (returns array instead of DllStruct) - Many examples added (mostly complete for FTP functions) WinINet_2008_08_22.zip - Fixed INTERNET_CACHE_ENTRY_INFO-related functions (they return an array now rather than the raw structure) - Added examples for _WinINet_FindFirstUrlCacheEntry() and _WinINet_CreateUrlCacheEntry() WinINet_2008_08_16.zip - Fixed some string/buffer length issues WinINet_2008_08_11.zip - Added _WinINet_FindCloseUrlCache - Added _WinINet_FindFirstUrlCacheEntry - Added _WinINet_FindFirstUrlCacheEntryEx - Added _WinINet_FindFirstUrlCacheGroup - Added _WinINet_FindNextUrlCacheEntry - Added _WinINet_FindNextUrlCacheEntryEx - Added _WinINet_FindNextUrlCacheGroup - Added _WinINet_InternetCrackUrl - Added _WinINet_InternetCreateUrl WinINet.zip - Initial release Function List IMPLEMENTED =========== _WinINet_CommitUrlCacheEntry _WinINet_CreateUrlCacheEntry _WinINet_CreateUrlCacheGroup _WinINet_DeleteUrlCacheEntry _WinINet_DeleteUrlCacheGroup _WinINet_DetectAutoProxyUrl _WinINet_FindCloseUrlCache _WinINet_FindFirstUrlCacheEntry _WinINet_FindFirstUrlCacheEntryEx _WinINet_FindFirstUrlCacheGroup _WinINet_FindNextUrlCacheEntry _WinINet_FindNextUrlCacheEntryEx _WinINet_FindNextUrlCacheGroup _WinINet_FtpCommand _WinINet_FtpCreateDirectory _WinINet_FtpDeleteFile _WinINet_FtpFindFirstFile _WinINet_FtpGetCurrentDirectory _WinINet_FtpGetFile _WinINet_FtpGetFileSize _WinINet_FtpOpenFile _WinINet_FtpPutFile _WinINet_FtpRemoveDirectory _WinINet_FtpRenameFile _WinINet_FtpSetCurrentDirectory _WinINet_GetUrlCacheEntryInfo _WinINet_GetUrlCacheEntryInfoEx _WinINet_GetUrlCacheGroupAttribute _WinINet_GopherCreateLocator _WinINet_GopherFindFirstFile _WinINet_GopherGetAttribute _WinINet_GopherGetLocatorType _WinINet_GopherOpenFile _WinINet_HttpAddRequestHeaders _WinINet_HttpEndRequest _WinINet_HttpOpenRequest _WinINet_HttpQueryInfo _WinINet_HttpSendRequest _WinINet_HttpSendRequestEx _WinINet_InternetAttemptConnect _WinINet_InternetAutodial _WinINet_InternetAutodialHangup _WinINet_InternetCanonicalizeUrl _WinINet_InternetCheckConnection _WinINet_InternetClearAllPerSiteCookieDecisions _WinINet_InternetCloseHandle _WinINet_InternetCombineUrl _WinINet_InternetConfirmZoneCrossing _WinINet_InternetConnect _WinINet_InternetCrackUrl _WinINet_InternetCreateUrl _WinINet_InternetDial _WinINet_InternetEnumPerSiteCookieDecision _WinINet_InternetErrorDlg _WinINet_InternetFindNextFile _WinINet_InternetGetConnectedState _WinINet_InternetGetConnectedStateEx _WinINet_InternetGetCookie _WinINet_InternetGetCookieEx _WinINet_InternetGetLastResponseInfo _WinINet_InternetGetPerSiteCookieDecision _WinINet_InternetGoOnline _WinINet_InternetHangUp _WinINet_InternetLockRequestFile _WinINet_InternetOpen _WinINet_InternetOpenUrl _WinINet_InternetQueryDataAvailable _WinINet_InternetQueryOption _WinINet_InternetReadFile _WinINet_InternetReadFileEx _WinINet_InternetSetCookie _WinINet_InternetSetCookieEx _WinINet_InternetSetFilePointer _WinINet_InternetSetOption _WinINet_InternetSetPerSiteCookieDecision _WinINet_InternetSetStatusCallback _WinINet_InternetTimeFromSystemTime _WinINet_InternetTimeToSystemTime _WinINet_InternetUnlockRequestFile _WinINet_InternetWriteFile _WinINet_PrivacyGetZonePreferenceW _WinINet_PrivacySetZonePreferenceW _WinINet_ReadUrlCacheEntryStream _WinINet_ResumeSuspendedDownload _WinINet_RetrieveUrlCacheEntryFile _WinINet_RetrieveUrlCacheEntryStream _WinINet_SetUrlCacheEntryGroup _WinINet_SetUrlCacheEntryInfo _WinINet_SetUrlCacheGroupAttribute _WinINet_Shutdown _WinINet_Startup _WinINet_Struct_InternetCacheEntryInfo_ToArray _WinINet_Struct_InternetCacheGroupInfo_FromArray _WinINet_Struct_InternetCacheGroupInfo_ToArray _WinINet_Struct_UrlComponents_FromArray _WinINet_Struct_UrlComponents_ToArray _WinINet_UnlockUrlCacheEntryFile _WinINet_UnlockUrlCacheEntryStream NOT LIKELY TO BE IMPLEMENTED (don't seem to be relevant) ============================ _WinINet_CleanupCredentialCache _WinINet_CreateMD5SSOHash _WinINet_InternetDeInitializeAutoProxyDll _WinINet_InternetGetProxyInfo _WinINet_InternetInitializeAutoProxyDll Remarks There have been many UDFs released previously that rely on WinINet functions, but not many that are just direct wrappers around the functions (the FTP UDFs are the main ones that come to mind). The aim here is to get these functions into the standard UDFs, so that these UDFs can provide a base for other functions that rely on WinINet. I've implemented most of the functions, but I haven't tested most of them either (the important ones, like InternetOpen/Connect and various HTTP functions are mainly what I tested). Indeed, the constants file is still very disorganized (and incomplete), but I'll try getting around to that another time. In the meanwhile, I'm releasing what I currently have for wider testing and peer review of sorts. Feedback is welcome, as always Anyhow, test away! Edit: Just a note... before you use most of these functions, you'll need to call _WinINet_Startup(). Edit: And uh... I don't have example scripts for every single function at the moment. That would probably help with testing...0 points
-
0 points