Use Amazon SWF to communicate messages between servers?

On server A I want to run a script A 
When that is finished I want to send a message to server B to run a script B 
If it completes successfully I want it to clear the job from the workflow queue

I’m having a really hard time working out how I can use Boto and SWF in combination to do this. I am not after some complete code but what I am after is if anyone can explain a little more about what is involved. 

How do I actually tell server B to check for the completion of script
A? 
How do I make sure server A wont pick up the completion of script
A and try and run script B (since server B should run this)? 
How do I actually notify SWF of script A completion? Is thee a flag, or a
message, or what?

I’m pretty confused about all of this. What design should I use?
I don't have any example code to share, but you can definitely use SWF to coordinate the execution of scripts across two servers.  The main idea with this is to create three pieces of code that talk to SWF:

A component that knows which script to execute first and what to do once that first script is done executing.  This is called the "decider" in SWF terms.
Two components that each understand how to execute the specific script you want to run on each machine.  These are called "activity workers" in SWF terms.

The first component, the decider, calls two SWF APIs: PollForDecisionTask and RespondDecisionTaskCompleted.  The poll request will give the decider component the current history of an executing workflow, basically the "where am i" state information for your script runner.  You write code that looks at these events and figure out which script should execute.  These "commands" to execute a script would be in the form of a scheduling of an activity task, which is returned as part of the call to RespondDecisionTaskCompleted.
The second components you write, the activity workers, each call two SWF APIs: PollForActivityTask and RespondActivityTaskCompleted.  The poll request will give the activity worker an indication that it should execute the script it knows about, what SWF calls an activity task.  The information returned from the poll request to SWF can include single execution-specific data that was sent to SWF as part of the scheduling of the activity task.  Each of your servers would be independently polling SWF for activity tasks to indicate the execution of the local script on that host.  Once the worker is done executing the script, it calls back to SWF through the RespondActivityTaskCompleted API.
The callback from your activity worker to SWF results in a new history being handed out to the decider component that I already mentioned.  It will look at the history, see that the first script is done, and schedule the second one to execute.  Once it sees that the second one is done, it can "close" the workflow using another type of decision.
You kick off the whole process of executing the scripts on each host by calling the StartWorkflowExecution API.  This creates the record of the overall process in SWF and kicks out the first history to the decider process to schedule the execution of the first script on the first host.
Hopefully this gives a bit more context on how to accomplish this type of workflow using SWF.  If you haven't already, I would take a look at the dev guide on the SWF page for additional info.
Using Amazon SWF To communicate between servers