I added some support for inline run of AppleScript snippets, which might
help in such situations.

In this case, this works to open Mail:

# version to run a multiline AppleScript script
cmd = """
applescript
tell application "Mail" to activate
display alert "Mail should have started" 
"""
if 0 != runScript(cmd):
  popup("did not work\nsee error message")
  exit(1)

wait(3); App.close("Mail"); wait(3)

# version to run a one-line AppleScript script
if 0 != runScript('applescript tell application "Mail" to activate'):
  popup("did not work\nsee error message")

# to get the textual output of the command
textResult = RunTime.get().getLastCommandResult()


** Summary changed:

- [1.1.0] OS X 10.10.3: App.open("Mail") doesn't work anymore --- specific Mac 
problem
+ [1.1.0] OS X 10.10.3: App.open("Mail") doesn't work anymore --- specific Mac 
problem --- workaround

** Description changed:

+ ----------- workaround
+ ... for situations, where SikuliX App features crash, do not work as expected 
or are not available at all:
+ run AppleScript snippets inline, that do the job:
+ runScript("applescript tell application ...")
+ 
+ ... would internally run the given snippet using osascript.
+ 
+ An example for this specific Mail situation: comment #3
+ 
+ ---------------------------------------------------------
+ 
  For some reason I can no longer launch applications using App.open anymore 
with the latest night build.
  It executes the code but the application does not actually launch.
  ie,
  
  App.open("/Applications/Mail.app")

** Summary changed:

- [1.1.0] OS X 10.10.3: App.open("Mail") doesn't work anymore --- specific Mac 
problem --- workaround
+ [1.1.0] OS X 10.10.3: App.open("Mail") doesn't work anymore --- specific Mac 
problem --- workaround (available 2015-04-20+)

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1445667

Title:
  [1.1.0] OS X 10.10.3: App.open("Mail") doesn't work anymore ---
  specific Mac problem --- workaround (available 2015-04-20+)

Status in Sikuli:
  Confirmed

Bug description:
  ----------- workaround
  ... for situations, where SikuliX App features crash, do not work as expected 
or are not available at all:
  run AppleScript snippets inline, that do the job:
  runScript("applescript tell application ...")

  ... would internally run the given snippet using osascript.

  An example for this specific Mail situation: comment #3

  ---------------------------------------------------------

  For some reason I can no longer launch applications using App.open anymore 
with the latest night build.
  It executes the code but the application does not actually launch.
  ie,

  App.open("/Applications/Mail.app")

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1445667/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to