I have the application (script below) that opens a prompt where you enter the serial number and it automatically takes you to the page on everymac.com that shows you the info on that model.
I actually figured out (sort of) what I wanted to do BUT it leaves quotes in the box. How do I remove the quotes?
I actually figured out (sort of) what I wanted to do BUT it leaves quotes in the box. How do I remove the quotes?
Code:
[B]set[/B] strSerialNumber [B]to[/B] ""
# get string from terminal
[B]set[/B] strIOPlatformSerialNumber [B]to[/B] [B]do shell script[/B] "ioreg -l | grep IOPlatformSerialNumber"
# work with returned string to get results from last token
# set custom delimiters
[B]set[/B] AppleScript'stext item delimiters [B]to[/B] "="
[B]set[/B] lstIOPlatformSerialNumber [B]to[/B] [I]text items[/I] [B]of[/B] strIOPlatformSerialNumber
[B]set[/B] strSerialNumber [B]to[/B] [I]item[/I] 2 [B]of[/B] lstIOPlatformSerialNumber
# reset script engine delimiters
[B]display dialog[/B] "Enter Serial Number" default answerstrSerialNumber
[B]set[/B] serial_num [B]to[/B] text returned [B]of[/B] result
[B]set[/B] url_to_open [B]to[/B] "http://www.everymac.com/ultimate-mac-lookup/?search_keywords=" & serial_num
[B]tell[/B] [I]application[/I] "Safari"
[B]activate[/B]
[B]open location[/B]url_to_open
[B]end[/B] [B]tell[/B]
[code]