Thanks for your time!
boiler wrote: ↑14 Mar 2020, 09:08
... Will the leading 0 always be stripped before adding 0046 to the front of it?
Yes!
boiler wrote: ↑14 Mar 2020, 09:08
..the number could be between 8 and 10 digits.
Yes! (But I'm changing it now)
Right now it feels better to focus on the following. Only phone numbers containing 10 digits can be used. eg.
0701234567
(although in exceptional cases there are both shorter and longer mobile numbers)
It is better to check that all mobile numbers is starting with the following sequences.: (in Sweden) All mobile numbers start with the following numbers 070, 072, 073, 076, or 079 In this case, it is probably best to start from a list so that if new / other digit combinations emerge, it will be easy to add to the AHK-program.
boiler wrote: ↑14 Mar 2020, 09:08
Do you need the final number with the 0046 added to be a certain length, or will it vary in length depending on the length of the base number?
Since I skipped phone numbers other than 10 digits, the result will always be .: 10 digits minus the initial 0 plus 0046 = 13 digits total.
For Example
These phone numbers have a correct number structure
- Input = 0701234567 Result .: 0046701234567
- Input = 070 123 45 67 Result .: 0046701234567
- Input = 0721234567 Result .: 0046721234567
- and this is
NOT phone numbers
- Input = 1234567 (too few digits and does not start with 0)
- Input = 0741234567 (Starts with 074 - not with the above combinations)
- Input = 7012345678 (Does not start with 0)
- Input = 070-1234567 (hyphen is not a number)
- Input = Kalle (Not a number )
If it is not a valid mobile number, it may contain a maximum of 11 characters / words / numbers. But I'll handle with that later.
Thanks in advance