18 posts in this topic
How i can compare two dates?
Hi to all
My problem is how can I compare two dates
if I have the following code:
$date = _NowDate() $dateend = "10/12/2016" if $date > $dateend Then Exit EndIf It does not work well
I guess it's because I'm comparing two strings not realy two dates.
My idea would break the date into three numbers year, month and day and go comparing data as numbers.
is this correct...?
Thank's to all
Hoping for some guidance, I have a string like:
$string='vXx2586578£&' How can I go abouts shuffling the contents of the string?
Send string to Arduino
So I'm trying to send a string of data to Arduino using CommMG UDF. It seems that Arduino is not receiving it. I used Device Monitoring Studio and it shows that the data is sent fine and looks exactly the same as if I sent it from Arduino Serial Monitor. Is CommMG compatible with USB?
Global $CMPort = 9 Global $CmBoBaud = 9600 Global $sportSetError = '' Global $CmboDataBits = 8 Global $CmBoParity = "none" Global $CmBoStop = 1 Global $setflow = 2 _CommSetPort($CMPort, $sportSetError, $CmBoBaud, $CmboDataBits, $CmBoParity, $CmBoStop, $setflow) If @error Then MsgBox(16,"Error!","Can't connect to Arduino on port - "&$CMPort) Exit EndIf _CommSetRTS(0) _CommSetDTR(0) _CommSendString("x" & 128 & "y" & 256 & "e", 1)
Extract "never the same" string from filename
Hope you're doing great today.
Well, I have a little question about extracting a certain string from a file name to make comparison after treatment.
Let's get into the details:
First of all, I gather and store a machine BIOS Version by running this:
RunWait(@ComSpec & " /c " & "wmic bios get SMBIOSBIOSVERSION >> C:\Drivers\Tag.txt" & @CRLF, "", @SW_HIDE, "$STDOUT_CHILD") _FileWriteToLine("c:\Drivers\BIOS_Version.txt", 1, "", 1) $sContent = FileRead ("C:\Drivers\BIOS_Version.txt") $sContent = StringRegExpReplace($sContent, " ", "") Result is, for example, A10
Then, I download the latest available BIOS version from the Dell related model website and the filename of the latest BIOS is stored in a $sBIOSName variable.
Result is for example, E5440A14.exe
What i can't figure out is how to extract the Bios name stored in the $sBIOSName knowing that each model this app would run won't have the same number of chars.
Indeed, I have some OPL790AXX.exe / OPL7010AXX.exe / E5470AXX.exe etc...
I imagine something like getting the whole string, left trimming it to the first A found count 2 chars on the right and store them to have the possibility to make the check between A10 and A14 (as the number of char of filenames is never the same)
Hope this is clear If not, don't hesitate to ask for more.
Thanks in advance for the help
I have a string looking like this:
This is how my database looks, I would like to split my file in to
The reason why I wish to do this is to have an easier view of my users, I may also want to encrypt passwords even further and I cannot do this with a string looking like that!
Thanks in advance.