How do I add an action to insert variable data that is user specific?

303 views
Skip to first unread message

Vincent Polisi

unread,
Mar 11, 2012, 2:46:09 PM3/11/12
to Fake
Great app!

In my workflow, I have it set to login to Do.com, click Projects,
click Create Project and now I need to add the project name (which is
the client's name) and then I will add to the workflow to click the
+button to send an invite which will bring up the invite dialog and
here I need to paste the client's email address.

How do I do this since it will be different every time for each
client?

The information is contained in several places (a Wufoo form, PayPal
notification of payment, MailChimp email notification of new
subscriber, etc.).

All I need to do is be able to capture the information and paste it.

How do I do that?

Thanh Pham

unread,
Mar 11, 2012, 6:56:58 PM3/11/12
to fak...@googlegroups.com
You could always do a javascript prompt to enter new values ... but I think there are more efficient ways of implementing it.
--
Thanh Pham, QA Engineer
thismoment | c. 408.813.5166 | th...@thismoment.com

Engage everyone, everywhere, easily - learn more


Charlie Garrison

unread,
Mar 12, 2012, 8:29:17 AM3/12/12
to fak...@googlegroups.com
Good evening,

On 11/03/12 at 11:46 AM -0700, Vincent Polisi
<vin...@vincentpolisi.com> wrote:

>How do I do this since it will be different every time for each
>client?

I use AppleScript to pass values to a workflow and run it. I
vary the passed values depending on how I need to run the workflow.

property user_name : "http://www.maturematchmaker.com.au"

tell application "Fake"
open file "MacHD:Users:charlie:FakeTests:test.fakeworkflow"
tell document "test"
run workflow with variables {username:user_name}
end tell

end tell


Then in the workflow start with a Do Javascript action to set a
default value (if one is not passed in):

if(!window.fake.get("username")){
window.fake.set("username", 'testuser')
};

And in your Set Values action (or similar) just use the
`username` variable for the value:

Name: username
Value: ${username}

You can use the above to pass many different values; eg. client
name, email address, etc. You could have the AppleScript prompt
for those values before passing them to the workflow.


Charlie

--
Ꮚ Charlie Garrison ♊ <garr...@zeta.org.au>

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
http://www.ietf.org/rfc/rfc1855.txt

Vincent Polisi

unread,
Mar 12, 2012, 5:40:39 PM3/12/12
to fak...@googlegroups.com
Charlie:

Thank you. Your javascript skills obviously far surpass mine which isn't saying a lot since mine are next to nil. Is there not a simple way to paste contents from the clipboard? 

I would think this would be simple since we can get contents onto the clipboard yet it remains a very elusive beast. 

Todd was kind enough to send this example however as I demonstrate in this screencast (bottom of page), Wufoo isn't assigning a variable that I can then use the javascript function to call (and Todd uses a Wufoo form in his sales video so I am obviously doing something wrong). I have managed to get the data copied to the clipboard using this string: 

Using "Contents of Clipboard to…..value of /HTML[1]/BODY[1]/DIV[2]/DIV[2]/DIV[1]/TABLE[2]/TBODY[1]/TR[1]/TD[1] 

however, I cannot paste it to the text field presumably because it isn't assigned as a Fake variable. 

All I need to do presently is simply be able to copy and paste dynamic names and email addresses.

Is it safe to assume since that this would represent two different clipboard items that each time either item is needed (since the workflow will require them in a switching sequence, e.g., name, then email address, then name, then email address) that it will have to run the workflow for getting name and/or email each and every time throughout the workflow as an individual workflow or is there a way to save two different clipboard items and call them at will? 

In other words, as an example:

Begin Workflow
Run Other Workflow To Get Name, Copy & Paste It
Run Other Workflow to Get Email, Copy & Paste It
Continue Workflow
Run Other Workflow To Get Name, Copy & Paste It
Run Other Workflow To Get Email, Copy & Paste It
Continue Workflow
Run Other Workflow To Get Name, Copy & Paste It
Run Other Workflow To Get Email, Copy & Paste It

Or is there simply a way to:

Run Other Workflow To Get Name & Copy, Get Email & Copy
Paste Name
Paste Email
Continue Workflow
Paste Name
Paste Email

Anyway, any dumbed down help to assist with properly copying and pasting would be greatly appreciated. I am at a standstill without this ability.




Vincent Polisi

Charlie Garrison

unread,
Mar 12, 2012, 10:29:16 PM3/12/12
to fak...@googlegroups.com
Good afternoon,

On 12/03/12 at 5:40 PM -0400, Vincent Polisi
<vin...@vincentpolisi.com> wrote:

>Anyway, any dumbed down help to assist with properly copying
>and pasting would be greatly appreciated. I am at a standstill
>without this ability.

To me, doing all that via copy/paste is making it more
difficult. Using an Applescript to pass values to the workflow
means you don't have to worry about all those copy/paste issues.

Just copy the data you want, paste into the Applescript, repeat
for all values, then run the Applescript (which runs the
workflow with your copy/pasted values).

If you really want copy/paste within Fake then maybe someone
else can help; I don't know anything about it.

Vincent Polisi

unread,
Mar 14, 2012, 10:57:13 AM3/14/12
to fak...@googlegroups.com
Charlie:

What would be the easiest way to do that? 

I don't understand how or why it would be easier to manually enter data into an Automator Workflow when Fake is capable of copying the data automatically without me doing anything. The only need is to get that data that Fake copies to the clipboard off the clipboard and into an HTML form field. 


Vincent Polisi

Atlanta: 404-939-1478
Phoenix: 480-553-8933
Toll Free: 888-383-1787

Charlie Garrison

unread,
Mar 14, 2012, 5:49:24 PM3/14/12
to fak...@googlegroups.com
Good morning,

On 14/03/12 at 10:57 AM -0400, Vincent Polisi <vin...@vincentpolisi.com> wrote:

>What would be the easiest way to do that?

It was easiest for me; your needs may well differ so do it your way.

Reply all
Reply to author
Forward
0 new messages