This script can come in handy for me. Thanks.
As is, It works fine (the one without as text) text appears in the file as it should.
My version for what I need goes like this (below):
It all seems to work,
But when it inserts the details Example ( this is my caption ) I get text like
Ok Tried to insert the text that I get back but it screwed the post?
so see image
Some where in my code the text gets changed from plain text? by the look of it.
Any Ideas, Thanks
set Caption to {"", "Caption", ""}
set Caption_writer to {"", "Caption writer", ""}
set Headline to {"", "Headline", ""}
set Instructions to {"", "Instructions", ""}
set Byline to {"", "Byline", ""}
set Byline_Title to {"", "Byline_Title", ""}
set Credit to {"", "Credit", ""}
set Source to {"", "Source", ""}
set title to {"", "title", ""}
set Unknown1 to {"", "", "unkown"}
set City to {"", "City ", ""}
set State to {"", "State", ""}
set Country to {"", "Country", ""}
set reference_ to {"", "reference", ""}
set Categories to {"", "Categories ", ""}
set Supplemetal_Categories to {"", "Supplemetal Categories", ""}
set Unknown2 to {"", "", "unkown", ""}
set Keywords to {"", "Keywords", ""}
set Copyright_notice to {"", "Copyright_notice", ""}
set _URL to {"", "URL", ""}
global indexer
set indexer to {Caption, Caption_writer, Headline, Instructions, Byline, Byline_Title, Credit, Source, title, Unknown1, City, State, Country, reference_, Categories, Supplemetal_Categories, Unknown2, Keywords, Copyright_notice, _URL}
repeat with i from 1 to number of items in indexer
set this_item to item i of indexer
if item 3 of this_item is "unkown" then
set this_item to ""
else
display dialog "Enter : " & item 2 of this_item default answer "" buttons {"Cancel", "Done", "Next"} default button 3
copy the result as list to {text_returned, button_pressed}
set item 1 of this_item to text_returned as text
if button_pressed is "Done" then
my Set_cap()
exit repeat
else if button_pressed is "Next" and this_item is _URL then
my Set_cap()
exit repeat
else if button_pressed is "Next" then
end if
end if
end repeat
on Set_cap()
set indexer_a to {}
repeat with i from 1 to number of items in indexer
set this_itema to item i of indexer
copy item 1 of this_itema to end of indexer_a
end repeat
set img_file to choose file of type {"public.image"} with prompt "Choose an image file:" without invisibles
tell application "GraphicConverter" to set file iptc img_file to indexer_a
end Set_cap
edit** cleaned up script a bit, but still need the issue with the text to be sorted…