This is a repost because I posted this in the wrong forum - sorry about this. (If the moderators would be so kind as to remove this, it’d be helpful. EDIT: Took car of it myself - sorry.)
I am working on a program that consists of a bunch of scripts that get compiled into a RealBasic App that interfaces with Photoshop CS2. I am having a big issue, and am having difficulty implementing a solution.
I have something that is generated on the RB side of things (basically a set of crop marks that gets placed underneath the image I am working on when done) that gets placed into the clipboard. the problem is, sometimes the program doesn’t want to generate said file - hence, when the script that tells the document in Photoshop to paste goes to the clipboard, it hangs.
What I was thinking would be a good solution is to pass a message to RB to let it know whether it suceeded or not - that way, if it doesn’t suceed, the RB side knows to go back, replace/recreate said image on the clipboard, and retry the script again. The problem I have is, I have no clue what I am checking for in terms of how AS would see it!
Hence, the script would be something like this:
Open this Scriplet in your Editor:
If {there is something on the darn clipboard} then
Set RetVal to "True" -- Return Value is set to "True", which when it returns to RB, will see it as it's ok to continue.
-- continue with functions of paste - hardly necessary
else
Set RetVal to "False" -- Return Value is set to "False", telling the RB side to try to resend to the clipboard again.
end if
It’s the {there is something on the darn clipboard} that I need. Thanks.
(What’s sad is that I bet it is something simple!)