boiler wrote: ↑04 Feb 2022, 00:29
The only difference is it used to show
to the address below: and now it shows
To the address below:, which is only one letter changing case. So just make it be case insensitive with this minor change to one line:
Code: Select all
RegExMatch(Clipboard, "i)to the address below:\v+\K\V+", Address)
That solved the problem!
Now on to the next RegEx, and I don't know if I am abusing of your kindness here, but I sincerely appreciate it. And my script is almost done too, about 95% of it is behind me now.
With bitcoin transactions, there is a thing called "miner fee". It's a fee we pay to the Bitcoin miners to process a transaction. This fee is dynamic, it goes up when the network is busy and it goes down when not busy. With the sort of trading I do there are two miner fees involved: the miner fee I pay to get the Bitcoin I sell into the multisig address (or escrow if ou prefer), and the miner fee the buyer pays to get it out of escrow and into his own wallet.
Now the whole point of automating my trades is so I can offer the cheapest Bitcoin price with the lowest mark up in price to a wide variety of buyers with anything from a $20 purchase to a $3000 purchase. This is a market most other traders don't want to deal with because it's just not worth the time and effort to sell $20 of Bitcoin unless they really hike up their profit margin.
This is where I come in. Since it's automated, I don't care if you want to buy $20 and I only make pennies off of it. The puter does it all while I'm watching cute cat vids on YouTube or sleeping at my work.
But I need my clients to accept to pay the miner fee from me to the escrow or order to drop my prices to a minimum even with chump change trades. So I ask a question in the chat that looks like this on the clipboard:
Code: Select all
Clipboard :=
PepeBot says: Okay so the contract price is 248 CAD but to trade with me I require that the buyer (you) pay the miner fee from my wallet to the escrow. The miner fee at this time for this transaction will be 1.08 CAD for a total cost of 249.08 CAD. Do you agree to pay 249.08 CAD for this trade? (YES or NO only please)
2/4/2022, 5:44:00 PM
My messages always start with
PepeBot says: and there will always be a time stamp at the bottom of every messaage, like shown above. I want to grab the content of the next message after the one that starts with
PepeBot says: and ends with
(YES or NO only please)
And I would like to know how many words in his reply. The clipboard would look like this:
Code: Select all
Clipboard :=
PepeBot says: Okay so the contract price is 248 CAD but to trade with me I require that the buyer (you) pay the miner fee from my wallet to the escrow. The miner fee at this time for this transaction will be 1.08 CAD for a total cost of 249.08 CAD. Do you agree to pay 249.08 CAD for this trade? (YES or NO only please)
2/4/2022, 5:39:38 PM
His answer here.
2/4/2022, 6:05:32 PM
So in essence, I need to grad the substring
His answer here. and I need to know how many words in his answer. Always between two time stamps, and always directly after
(YES or NO only please)
Figuring out if he says yes or no should be easy with InStr. So I got that part covered.
Can you help, please?
Now I keep thinking I won't need your help anymore. But I will likely have one more to ask you later on. That will be the big final one where I copy the content of an email informing me the payment has been received by my bank. Out of that one. I will only need two things: the name of the payment sender, which is always in capital letters, and the amount send. But I'm not quite there just yet.