Tuesday, December 12, 2017

#1 2002-03-12 08:01:24 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

NSLookup

I'd like to give my scripts the ability to look up the ip address of a URL, and vice-versa. Can anyone suggest a (freeware?) osax or scriptable utility that might do the job? I've searched here and the web, and all I've found so far is the scriptable application NSLookup (http://www.baylor.edu/~Carl_Bell/ReadMe … ookup.html), which would have been perfect had it not been a Classic application.

Thanks!


One mans trash is another mans treasure

Offline

 

#2 2002-03-13 01:21:20 pm

Rob
Member
From:: Ohio, USA
Registered: 2002-11-20
Posts: 1886

Re: NSLookup

I'd like to give my scripts the ability to look up the ip address of a URL, and vice-versa. Can anyone suggest a (freeware?) osax or scriptable utility that might do the job? I've searched here and the web, and all I've found so far is the scriptable application NSLookup (http://www.baylor.edu/~Carl_Bell/ReadMe … ookup.html), which would have been perfect had it not been a Classic application.


So when you say "had it not been a Classic application", does this mean that you want an OS X solution?

Offline

 

#3 2002-03-13 07:43:22 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Re: NSLookup

So when you say "had it not been a Classic application", does this mean that you want an OS X solution?


Yes, I'd much prefer an OS X solution. Sorry, could have made that more clear :-)


One mans trash is another mans treasure

Offline

 

#4 2002-03-13 10:03:44 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Re: NSLookup

Applescript:

set theResult to do shell script "NSlookup domainname"
display dialog theResult


One mans trash is another mans treasure

Offline

 

#5 2002-03-13 07:12:56 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Re: NSLookup

Applescript:

set theResult to do shell script "NSlookup domainname"
display dialog theResult



Thanks!  That's just what I was looking for.  I didn't even know AppleScript could execute commands in the shell.


One mans trash is another mans treasure

Offline

 

#6 2002-03-14 11:23:59 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Re: NSLookup

for Standard Additions you can invoke any shell script by the command:

Applescript:

do shell script

pretty fancy huh

also look at system events ;-)

cheers

Applescript:

do shell script: execute a shell script or command
   do shell script plain text -- the command or shell script to execute. Examples are ‘ls’ or ‘/bin/ps -auxwww’
       [administrator privileges boolean] -- execute the command as the administrator
       [password plain text] -- use this administrator password to avoid a password dialog
       [altering line endings boolean] -- change all line endings to Mac-style and trim a trailing one (default true)
   [Result: plain text] -- the command output

Class POSIX file: A file object specified with a POSIX (slash)-style pathname.
Properties:
   POSIX path 'file' [r/o] -- the POSIX (slash)-style path of any file or alias object


One mans trash is another mans treasure

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)