Re: [Sikuli-driver] [Question #670913]: Get key name in python

2018-07-16 Thread Dillon
Question #670913 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670913

Status: Open => Solved

Dillon confirmed that the question is solved:
Works splendidly! Thank you very much.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
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


Re: [Sikuli-driver] [Question #670913]: Get key name in python

2018-07-16 Thread Alex
Question #670913 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670913

Alex posted a new comment:
I'm not aware of the existence of this functionality. The [Key
Constants](http://sikulix-2014.readthedocs.io/en/latest/keys.html) help
page lists all of the available special keys. It would be trivial to
make a function that did this:

def print_special_key_string(key):
"""
Given a special key constant return a string.
:param key:
:return:
"""
if 'Key.' in key:
key = key.replace('Key.', '')  # Strip the 'Key.' text if it exists.

key_dict = {
u'\r': 'Enter',
u'': 'Window',
u'': 'Escape',
u'': 'ALT'
}

if key in key_dict:
return key_dict[key]
else:
raise ValueError('Unable to locate %s in the Special Key dictionary.' % 
key)


print(print_special_key_string(Key.WIN))

I couldn't paste the full list in but you get the idea. Make sure you
set the encoding at the top of your file:

# -*- coding: utf-8 -*-

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
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


Re: [Sikuli-driver] [Question #670913]: Get key name in python

2018-07-16 Thread Dillon
Question #670913 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670913

Status: Needs information => Open

Dillon gave more information on the question:
Post updated.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
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


Re: [Sikuli-driver] [Question #670913]: Get key name in python

2018-07-16 Thread Dillon
Question #670913 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670913

Description changed to:
Is there a function to get the name of a key as a string in Python?
Example str(Key.WIN) -> "Windows"

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
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


Re: [Sikuli-driver] [Question #670825]: 1.1.2 Screen.capture(region, 'name') not working

2018-07-16 Thread Alex
Question #670825 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670825

Removed link to bug: #670826
https://bugs.launchpad.net/bugs/670826
"Shotwell images with non-latin characters in file name are not published 
to Flickr"

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
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


Re: [Sikuli-driver] [Question #670825]: 1.1.2 Screen.capture(region, 'name') not working

2018-07-16 Thread Alex
Question #670825 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670825

Linked to bug: #670826
https://bugs.launchpad.net/bugs/670826
"Shotwell images with non-latin characters in file name are not published 
to Flickr"

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
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


Re: [Sikuli-driver] [Question #670913]: Get key name in python

2018-07-16 Thread Alex
Question #670913 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670913

Status: Open => Needs information

Alex requested more information:
Can you provide more information? The following commands work fine in
Sikuli:


CTRL+A to select all
type('a', Key.CTRL)

type(Key.TAB, Key.ALT)

I'm not really sure what you are asking but I would be happy to help.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
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


[Sikuli-driver] [Question #670913]: Get key name in python

2018-07-16 Thread Dillon
New question #670913 on Sikuli:
https://answers.launchpad.net/sikuli/+question/670913

Is there a function to the name as a string of a key in Python like Key.CTRL?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
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


Re: [Sikuli-driver] [Question #670899]: saved program no longer works

2018-07-16 Thread RaiMan
Question #670899 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670899

Status: Open => Needs information

RaiMan requested more information:
The script might be the same, but something MUST be different !!

How did you run the script when it worked and how do you run it now?

Anything changed in your environment? Other machine?

SikuliX versions used?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
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


[Sikuli-driver] [Question #670899]: saved program no longer works

2018-07-16 Thread Pamela Kilponen
New question #670899 on Sikuli:
https://answers.launchpad.net/sikuli/+question/670899

I was re-running a test that had previously run well before.  I now get  this 
message:

[error] script [ Sikuli test drop down Ryhmä ] stopped with error at line 
--unknown--
[error] Error caused by: SyntaxError: Illegal character in file '' for 
encoding 'utf-8'

I am having trouble pinpointing the issue, as it is the same code as I ran 
before and worked fine.

thank you!

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
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