Re: [fakeapp] Run Fake workflow in background

271 views
Skip to first unread message

Todd Ditchendorf

unread,
Jul 10, 2012, 8:04:26 PM7/10/12
to fak...@googlegroups.com
Fake cannot run in a "headless" mode, there must always be a real window on screen when workflows are run.

However, I'm fairly certain you can "Hide" an app via applescript (a google search should turn this up). this would be the same as clicking the "Hide" main menu item.

That may give you the effect you are looking for.

TD

On Tue, Jul 10, 2012 at 5:02 PM, automateguy <pts...@gmail.com> wrote:
Hi,  

Is there a way to run Fake workflows in the background or with the windows hidden?

tell application "Fake"

open "myworkflow.fakeworkflow"

delay 2

run workflow

wait until done

quit

end tell


When I run this, the Fake window pops up and it gets in the way of what I am doing.  I have different workflows running at different times base on different events.  It would be best if these workflows can run without having the window open on the screen.


Thanks.


Paul





Christopher Stone

unread,
Jul 11, 2012, 3:34:23 AM7/11/12
to fak...@googlegroups.com
On Jul 10, 2012, at 19:04, Todd Ditchendorf wrote:
Fake cannot run in a "headless" mode, there must always be a real window on screen when workflows are run.

However, I'm fairly certain you can "Hide" an app via applescript
______________________________________________________________________

tell application "System Events"
set visible of process "Fake" to false
end tell

Todd Ditchendorf

unread,
Jul 11, 2012, 5:41:15 PM7/11/12
to fak...@googlegroups.com
hm, it looks like Apple probably takes the "open document" command to also implicitly mean "unhide app", which I can probably understand.

might work if you hide the app after opening the document.

TD

On Wed, Jul 11, 2012 at 2:15 PM, automateguy <pts...@gmail.com> wrote:
Hi Christopher,

First of all, thanks for helping me out.  

I tried to run this but the window is still coming up.  Am I doing something wrong?

tell application "Fake"

  activate

end tell

tell application "System Events"

  set visible of process "Fake" to false

end tell

tell application "Fake"

  open "myworkflow.fakeworkflow"

  delay 2

  run workflow

wait until done

quit

end tell




Christopher Stone

unread,
Jul 12, 2012, 5:13:35 AM7/12/12
to fak...@googlegroups.com
On Jul 11, 2012, at 16:15, automateguy wrote:
I tried to run this but the window is still coming up.  Am I doing something wrong?
______________________________________________________________________

Hey There,

I can't fully test here, but try this:

on hideFake()
tell application "System Events"
set visible of process "Fake" to false
end tell
end hideFake

tell application "Fake"
run
open "myworkflow.fakeworkflow"
delay 2
run workflow
hideFake() of me
wait until done
quit
end tell

--
Best Regards,
Chris

Reply all
Reply to author
Forward
0 new messages