Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'HELP using this...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
HELP using this...
Authored by: inblosam on Jun 14, '03 07:29:40AM

I think I have the script right, but I can't even seem to get it to work! I have the AppleScript icon in the top dock near the clock (nice rhyme). I try to click on the script name there, and nothing. I can't drag anything there either. What am I doing wrong? I am somewhat new to this applescript thing. Is this right for putting together the new script:

<code>
on open theItems
set userDesktop to the path to desktop from user domain as text
tell application "Finder"
repeat
display dialog "Enter output file name" default answer userDesktop & "untitled.pdf"
set rawdata to text returned of the result
exists file rawdata
if result = true then
display dialog "File already exists. Enter different file name."
else
exit repeat
end if
end repeat
end tell

set RawScript to "joinPDF" & "'" & (the POSIX path of rawdata) & "'"
repeat with aFile in theItems
set RawScript to RawScript & "'" & (the POSIX path of aFile) & "'"
end repeat
do shell script RawScript
end open


on right_str(data_str, char)
(* this user defined routine returns a string that is part of the input less
the section up to the first ocurance of char*)
set trip to false
set output_str to ""
repeat with aCharacter in data_str
set letter to aCharacter as string
(* make same datatype as char*)
if char = letter then
set trip to true
(* means that first occurance of char has been found*)
end if
if trip = true then
set output_str to output_str & letter
(* if char has been found then copy input str to output str
character by character*)
end if
end repeat
return output_str
end right_str

on FindnReplace(data_str, findchar, replacechar)
set processed_str to ""
repeat with aCharacter in data_str
set letter to aCharacter as string
(*make same datatype as findchar*)
if letter = findchar then
(*if true then this character is to be replaced. copy replacechar
to output str.
if false then this character is to be retained. copy character to
output str*)
set processed_str to processed_str & replacechar
else
set processed_str to processed_str & letter
end if
end repeat
return processed_str
end FindnReplace
</code>

PLEASE help!



[ Reply to This | # ]