Re: Using Data From Tab Delimited Text File
Re: Using Data From Tab Delimited Text File
- Subject: Re: Using Data From Tab Delimited Text File
- From: Les Cavanagh <email@hidden>
- Date: Thu, 08 Nov 2001 17:49:22 +1000
on 8/11/2001 2:45 AM, Marc K. Myers at email@hidden wrote:
Thanks to Marc for this - a few customisations and it works perfectly.
A 6 hour hand job is now one double click or even automatic via a cron job!
>
>
This (admittedly untested) code should resolve both your problems.
>
Please note that "[optn-L]" replaces the actual AppleScript continuation
>
character:
>
>
set fileID to (open for access file "webLogFile")
>
try
>
set theText to (read fileID as {text} using delimiter {tab, return})
>
close access fileID
>
on error m number n
>
try
>
close access fileID
>
end try
>
display dialog "Error #" & (n as text) & return & m
>
end try
>
set appName to "nameOfTheApplication"
>
repeat with i from 1 to ((count theText) - 1) by 2
>
set filePath to "Macintosh HD:Web Server:Web Sites:server_stats:" & [optn-L]
>
((item i of theText) as text) & ":" & appName
>
tell application appName
>
tell application filePath
>
-- do stuff
>
end tell
>
end tell
>
repeat
>
delay 3
>
tell application "Finder" to set procList to name of the processes
>
if procList does not contain appName then
>
exit repeat
>
end if
>
end repeat
>
end repeat
>
>
Marc K. Myers <email@hidden>
>
http://AppleScriptsToGo.com
>
4020 W.220th St.
>
Fairview Park, OH 44126
>
(440) 331-1074
>
>
[11/7/01 11:44:27 AM]
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
--
Regards,
,-----/----.
| O | O | Les Cavanagh
| / | Certified Apple Engineer
| (__ | 0419 946 637
| \___|__/ | email@hidden
'-----\----'