丸つき数字を数値にデコードするAppleScriptです。よくよく考えるとこれまでに作っていなかったので、作っておきました。
AppleScript名:丸つき数字を数値にデコードする v2.scpt |
— – Created by: Takaaki Naganoya – Created on: 2021/11/26 — – Copyright © 2021 Piyomaru Software, All Rights Reserved — set dRes to decodeNumFromNumWithSign("⑮") of me –> 15 –丸つき数字を数値にデコードする v2 on decodeNumFromNumWithSign(aStr as string) set numStr1 to "①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳㉑㉒㉓㉔㉕㉖㉗㉘㉙㉚㉛㉜㉝㉞㉟㊱㊲㊳㊴㊵㊶㊷㊸㊹㊺㊻㊼㊽㊾㊿" set numStr2 to "❶❷❸❹❺❻❼❽❾❿⓫⓬⓭⓮⓯⓰⓱⓲⓳⓴" set numStr3 to "➀➁➂➃➄➅➆➇➈➉" set numStr4 to "➊➋➌➍➎➏➐➑➒➓" set numStr5 to "⓵⓶⓷⓸⓹⓺⓻⓼⓽⓾" –set numStr6 to "⑴⑵⑶⑷⑸⑹⑺⑻⑼⑽⑾⑿⒀⒁⒂⒃⒄⒅⒆⒇" –set numStr7 to "1︎⃣2︎⃣3︎⃣4︎⃣5︎⃣8︎⃣9︎⃣" –set numStr8 to "⒈⒉⒊⒋⒌⒍⒎⒏⒐⒑⒒⒓⒔⒕⒖⒗⒘⒙⒚⒛" set nList to {numStr1, numStr2, numStr3, numStr4, numStr5} repeat with i in nList set numTemp to contents of i if numTemp contains aStr then using terms from scripting additions set bNum to offset of aStr in numTemp end using terms from return bNum end if end repeat return false end decodeNumFromNumWithSign |
More from my site
(Visited 96 times, 1 visits today)