18 posts in this topic
how to split string by space but escape spaces inside quotes
I have a string like this:
"Video or movie" "parent" "Media or entertainment" "1" "1" "1" "0" "0" I would like to split it by the spaces but the space inside the quote(both double and single quotes) should be ignored. So the splitted strings should be:
"Video or movie" "parent" "Media or entertainment" "1"
String extraction question
I have a file that has a large amount of line items like the following:
Terms= Sub Total=2.49 Invoice Discount $= Tax Percentage=6 Sales Tax Amount or 'EXEMPT'=0.00 Invoice Total=2.49 Total Paid=0.00 Amount Due=2.49 Change=0.00 Clerk Name= Clerk Number=9998 I need to know how I can extract the dollar value after "Amount Due=" In this case its 2.49. Sometimes it will be between 0.01 and 20.00. How can I get that value? Also note that the number of items above the Amount Due= changes so I cannot use filereadline with the line number.
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)