|
|
 |  |
Re: Can QDNS be used to run a DNS-based blacklist?From: Men & Mice Support Date: Tuesday, December 21, 1999
Time: 2:41:00 amAt 2:30 PM +0100 12/20/99, Johan Solve wrote:
>Two scripting questions:
>1. IP numbers should be "unsigned integers" according to the QDNS
>Admin aete dictionary. This appears to be wrong. Should it say
>"Text" in the dictionary?
I've never really thought about it. I suppose that possibly it would accept the decimal equivalent of an IP address, but it's much simpler to just give it the text string, as you have done below.
>2. Do you have a sample script to create secondary records? I have a
>working script for this but it requires that the Secondary Data
>window is already open and I haven't found a way to open that window
>via script. Or is it just to open the SD file?
Just open the Secondary Domains file. For example (works under MacOS 9, at least):
tell application "Finder"
set DataFolder to (folder of application file of application process ¬
"QuickDNS Pro Admin" as string) & "QuickDNS Data:"
open file "Secondary Domains" of folder DataFolder
end tell
This will open the Secondary Data window, which you can then address by name or as document 1.
>My simple script (won't work if SD window is not open):
>tell application "QuickDNS Pro Admin"
> set domain to "mydomain.com"
> set prime to "111.222.33.44"
> make new SD record at end of document 1 with properties ¬
> {name:domain, filename:domain, first IP number:prime}
>end tell
Ah, very good. My knowledge of AppleScript is pretty spotty (self-taught), so I was never able to figure out the exact syntax of setting the properties in one step. Thank you.
____________________________________________________________________
Chris Buxton cbuxton@menandmice.com
Men & Mice http://www.menandmice.com
Makers of: QuickDNS Pro
|

Return to Digital Point Solutions' Home Page |