Hi everyone, hope you are doing fine
Well, I'm currently writing a small script that goes to a certain web page, finds the first link of a specified section and download the file associated to this link.
Depending on the computer that the tool is launched, the script gets the computer model and search in the (provided here) ini file which link to follow.
At first, Dell was kind enough to provide only one link but now, they provide two of them. The first one is now a .txt file ( ) whereas my script has been designed to download only the fist and latest link released for the BIOS Update.
Here's the current code which is working with only the first and latest link of the BIOS category:
So the question is:
In the case of double links like shown in the picture above, how it is possible to tell the script to download only the link containing an the .exe file?
Of course, I could have changed the array result to  instead of  [which is working] but it seems that Dell does that randomly and that I deal with a lot of computer models.
Thanks for the help you can provide,
There is a way to have a clean string value without any SOH STX etc... Values
#include <FileConstants.au3> #include <String.au3> #include <WinAPI.au3> #include <Array.au3> #include <File.au3> $file = _FileListToArrayRec(@ScriptDir,"*.otf",1,1,0,2) For $x = 1 to UBound($file)-1 ;ConsoleWrite(_ReadOffSet($ISO[$x],0x000000,12)) ConsoleWrite(_HexToString(StringStripWS(_ReadOffSet($file[$x],0x000000,16), 8))&@CRLF) $String = StringReplace(BinaryToString(_ReadOffSet($file[$x],0x000000,16)), Chr(0), "") FileWrite(@ScriptDir&"\file.txt",$String&@CRLF) FileWrite(@ScriptDir&"\file2.txt",_HexToString(StringStripWS(_ReadOffSet($file[$x],0x000000,16), 8))&@CRLF) Next Func _ReadOffSet($sFilePath,$iOffset,$iLen=1) Local $sRet="" Local $hFile=FileOpen($sFilePath,$FO_BINARY) FileSetPos($hFile,$iOffset,$FILE_BEGIN) $sRet=FileRead($hFile,$iLen) FileClose($hFile) Return $sRet EndFunc
I am trying to extract a date and time from a website using InetRead. The source for the page I am reading shows the date and time as shown below. I need to somehow extract the correct date and time from this information. Is there a function or calculation that will do this? The source shown here correlates to 15:20 (time) 29.03.17 (date).
<div class="cell game-date" data-time="1490818800000"> <div class="site__time" data-time="1490818800000"> <div class="time"></div> <div class="date"></div> </div> </div>
Hi. I'm looking forward to adding another language option for BinaryToString.
Basically, it only supports ANSI, UTF-8, UTF16 Little Endian, and UTF16 Big Endian. https://www.autoitscript.com/wiki/BinaryToString
Is there any way to adding Shift-JIS(Japanese, CP 932) and EUC-KR(Korean, CP 949)?
* Sorry for my many questions,
i use that and it's true and fine,
Local $dData = InetRead("http://example.com/my.html",1) $my = BinaryToString(StringReplace($dData, "0A", "0D0A"), 4) now how can i add functions in "my.html" and autoit run that function,
it's meant when ever "Read" data from website, use that serve as "Autoit Function",
something like that :
In "my.html" we have this :
MsgBox (1,"This is from website","this is from website") In script we have this :
#include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) GuiSetState() Local $dData = InetRead("http://example.com/my.html",1) $my = BinaryToString(StringReplace($dData, "0A", "0D0A"), 4) ;this place is for MsgBox from "my.html" While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Thanks Alot,