X-1.0rc2: Mac: apps containing blank in name cannot be closed --- workaround

Bug #772014 reported by yellowsoar on 2011-04-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sikuli
Undecided
Unassigned

Bug Description

***** workaround
e.g. Address Book.app

App("Address Book").open() # works

to close the app, escape the blank with \

App("Address\ Book").close() # works

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

I think the reason that Address Book.app and Disk Utility.app could not be closed by "App.close("")" is because the file name is not in English when the language setting has been set to Traditional Chinese.

Will this problem be fixed?

Related branches

RaiMan (raimund-hocke) on 2011-04-28
summary: - some app could not be closed in Traditional Chinese OS
+ X-1.0rc2: Mac: some app could not be closed in Traditional Chinese OS

committed for Mac OSX 10.6 German.

But I think, this is because of the blank in the CFBundleDisplayName, which is the real name of the bundle folder in the folder /Applications. Finder displays the localized names instead.

The problem exists in my German OS too.

The Finder filenames of some apps like Preview, System Preferences and others are in german, but cannot be used with Sikuli's App feature, you have to use the english name.

--- How to solve the blank problem - escape the blank with \
It is weird, but works:
App("Address\ Book").focus() # does not work
wait(2)
aBook = App("Address Book") # works
aBook.focus() # opens if not open
wait(2)
aBook.close() # does not work
App("Address\ Book").close() # works

So for apps with an intervening blank you have to use 2 different strings

summary: - X-1.0rc2: Mac: some app could not be closed in Traditional Chinese OS
+ X-1.0rc2: Mac: apps containing blank in name cannot be closed ---
+ workaround
Changed in sikuli:
status: New → Confirmed
RaiMan (raimund-hocke) on 2011-04-28
description: updated
yellowsoar (yellowsoar) wrote :

This is really weird!
But it works in Traditinal Chinese OS.
Thanks a lot! ^_^

Changed in sikuli:
milestone: none → x1.0-rc3
Changed in sikuli:
status: Confirmed → Fix Committed
RaiMan (raimund-hocke) on 2011-09-27
Changed in sikuli:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers