Search Again:

Re: AppleScript & QuickDNS Pro

From: Sigurdur Ragnarsson
Date: Monday, November 30, 1998
Time: 7:17:00 am

On 29.11.1998 at 12:43, tbritt@alternativemedia.com (Travis Britt) wrote:

> We've got about 80 domains, and I need to make some global changes to the
> SOA values. So of course I'd like to use AppleScript to automate it.
> Everything is working great except when I try to save a modified domain.
> No matter how I try to do it it throws an OS error -35, which usually means
> it can't find the volume it's supposed to write to (right?).
>
> I'm using the following syntax:
> close document 1 saving yes
>
> I even tried writing out different paths to the saved file:
> save document 1 in "Hard Disk:Some Folder:mydomain.com."
>
> No dice.
>
> Anyone had trouble with this before? What am I missing? I tried the same
> save function with another app and it works fine, so I don't think it's a
> system issue. Maybe it's specific to QuickDNS Pro?
>

The following script performs search and replace for a specific IP address in a
zone. It currently opens only the first zone in the Primary Data folder, but
with minor modifications it can be used to do a global search and replace. The
script also shows how to save a document with QuickDNS Admin:

--cut here--

property thePath : "Disk:QDNS 2.1:QuickDNS Data:Primary Data:"

tell application "Finder"
set fileList to name of every file of folder thePath
end tell

tell application "QuickDNS Pro Admin"
activate
open file (thePath & item 1 of fileList)
try
set IP number of every A record of document 1 whose IP
number is "192.168.1.1" to "192.168.1.4"
on error
end try
save document 1 in file (thePath & item 1 of fileList)
close document 1

end tell

--cut here--

---
Sigurdur Ragnarsson Men & Mice.
siggi@menandmice.com http://www.menandmice.com



Messages In This Thread:



Return to Digital Point Solutions' Home Page