Results 1 to 1 of 1
Thread: Apple Script error
-
07-24-2019, 11:07 AM #1
- Member Since
- Jul 24, 2019
- Posts
- 1
- Rep Power
- 0
Apple Script errorHi All,
Im writing a script to automate Quarkxpress and Xdata auto import script.
I got a script from my friend it is as below
--If double clicked
on run
set aFile to «event ScTlstdF» given «class prmp»:"Select the BARCODEFILM files to process" --of type "TEXT"
set fileContents to ""
set fileName to ""
set fileType to ""
try
repeat with i from 1 to count of items in aFile
open for access (item i of aFile)
set fileContents to fileContents & (read (item i of aFile))
close access (item i of aFile)
set AppleScript's text item delimiters to {":"}
set fileName to fileName & last text item of (item i of aFile as text)
set thisFileName to last text item of (aFile as text)
set AppleScript's text item delimiters to ""
if thisFileName does not contain ".TXT" then
beep
display dialog """ & thisFileName & """ & " is an invalid text file." & return & return & "To run VILLAGER(.TXT) the unaltered file name must include the suffix " & "".TXT"" buttons "Cancel" with icon 1 default button 1
end if
set fileName to («event WaynTrim» {".TXT"} given «class tOFF»:fileName)
end repeat
on error errMsg
close access (item i of aFile)
activate
display dialog errMsg
return
end try
processBarcodeOrders(fileName, fileType)
end run
When I run it shows an error on «event ScTlstdF» given «class prmp»:"Select the BARCODEFILM files to process"
I have bolded and underline in the code.
Does anyone knows why this error?
Please help
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Why does this simple apple script generate an error?
By zBernie in forum macOS - Development and DarwinReplies: 5Last Post: 09-23-2015, 12:37 PM -
script error
By chey77 in forum macOS - Operating SystemReplies: 0Last Post: 05-30-2012, 12:09 AM -
Automator and Apple script error handling
By BjZ in forum macOS - Operating SystemReplies: 1Last Post: 01-02-2010, 12:40 PM -
Perl script error
By icue in forum macOS - Development and DarwinReplies: 1Last Post: 09-09-2009, 01:39 AM -
Java Script Error Please Help
By Talkingstone in forum Apple DesktopsReplies: 0Last Post: 05-27-2009, 09:03 AM
Tags for this Thread
-