MAC vendor lookup: Difference between revisions
→{{header|AppleScript}}: Do the appending and delaying in AS instead of shell
Thundergnat (talk | contribs) m (Thundergnat moved page MAC Vendor Lookup to MAC vendor lookup: capitalization policy (don't know how I missed this one for so long...)) |
(→{{header|AppleScript}}: Do the appending and delaying in AS instead of shell) |
||
Line 63:
=={{header|AppleScript}}==
<lang AppleScript>set apiRoot to "https://api.macvendors.com"
set
set table to {}
repeat with burger in macList
delay 1.5
end repeat
set text item delimiters to linefeed
return table as string
</lang>
If this is part of a larger script you probably want to save and restore the text item delimiters:
▲set {table, macList} to {{return}, {"88:53:2E:67:07:BE", "D4:F4:6F:C9:EF:8D", "FC:FB:FB:01:FA:21", "4c:72:b9:56:fe:bc", "00-14-22-01-23-45"}}
<lang applescript>set savedTID to text item delimiters
set text item delimiters to linefeed
set text item delimiters to savedTID
return tableText</lang>
▲return table as string
{{out}}
<pre>
Intel Corporate
Apple, Inc.
Line 94 ⟶ 93:
PEGATRON CORPORATION
Dell Inc.
</pre>
|