WINKEY + Tab ?

How can I send the unimacro WINKEY + Tab command to vocola?

(This is the Flip 3D Windows command)

The following syntax does not work:

[anyphrase]= Unimacro("WINKEY {Tab}");

Thanks in advance

rh

BTW I was amazed how well NatLink, Vocola 2 and Unimacro installed and work with DNS 10 preferred. Great work, thank you.

(moved to this forum by Admin)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

What exactly goes wrong?

What exactly goes wrong?

I think the WINKEY command

I think the WINKEY command needs ONE character only. This must then be the \t character and not 5 characters {, t, a, b, and }.

Try this fix in the file actions.py (in the unimacro directory) around line 1160 :

after the lines:

def do_WINKEY(letter=None):
    """call the winkeys.dll with the letter"""
    letter = letter or ""
    letter = str(letter)

insert:

    if letter.lower() == "{tab}":
        letter = '\t'

I have no NatLink on my Vista computer installed, so cannot check myself currently.

Quintijn

nothing happens

Action.py now is:

def do_WINKEY(letter=None):
"""call the winkeys.dll with the letter"""
letter = letter or ""
letter = str(letter)
if letter.lower() == "{tab}":
letter = '\t'
dllFile = os.path.join(natqh.getUserDirectory(), "dlls", "DNSKeys.dll")
## print 'calling %s with letter: %s'% (dllFile, letter)
if len(letter) > 1:
natlink.execScript('DllCall "%s","WinKey",""'% dllFile)
natlink.playString(letter)
else:
natlink.execScript('DllCall "%s","WinKey","%s"'% (dllFile,letter))
return 1

................................................................................................................

anyphrase = Unimacro("WINKEY {tab}"); no response

anyphrase = Unimacro("WINKEY t"); scolls through taskbar icons

I feel like I'm getting close though !

rh

Try these lines at the

Try these lines at the bottom of the do_WINKEY function:

    if len(letter) > 1:
        if letter == "{tab}":
            letter = '\t'
        else:          
            print 'len letter: %s, should be length 1 or {tab}, not: |%s|'% (len(letter), letter)                   
            return
    natlink.execScript('DllCall "%s","WinKey","%s"'% (dllFile,letter))
    return 1

and in your Vocola file:

include Unimacro.vch;

Testing windows key = WINKEY({tab});

The other format does not work here either, I do not know why not.

Any other control characters? I will commit my changes soon.

Quintijn

Is this then correct:

Is this then correct: (action.py)

.
.
.
def do_WINKEY(letter=None):
"""call the winkeys.dll with the letter"""
letter = letter or ""
letter = str(letter)
dllFile = os.path.join(natqh.getUserDirectory(), "dlls", "DNSKeys.dll")
## print 'calling %s with letter: %s'% (dllFile, letter)
if len(letter) > 1:
natlink.execScript('DllCall "%s","WinKey",""'% dllFile)
natlink.playString(letter)
else:
natlink.execScript('DllCall "%s","WinKey","%s"'% (dllFile,letter))
if len(letter) > 1:
if letter == "{tab}":
letter = '\t'
else:
print 'len letter: %s, should be length 1 or {tab}, not: |%s|'% (len(letter), letter)
return
natlink.execScript('DllCall "%s","WinKey","%s"'% (dllFile,letter))
return 1
.
.
.

Are the two "if" statements, redundant??

Testing windows key = WINKEY({tab}); in the Vocola.vcl folder: No response

Sorry for the newbie questions - I've done a fair amount of programming using VB 6.0, but I'm not very fluent (yet) with Python.

After looking at some of the unimacro examples, I'm not sure if I even need to use Vocola 2.

Thanks again for your help.

rh

I discovered by accident

I discovered by accident that sending the following unimacro command:

Flip3D = Unimacro("WINKEY 1"); activated the first icon on my Taskbar

Which just happened to be the Flip3D icon !!

Likewise, the numbers 2 .. 9 activate the second through ninth icons on the taskbar.

Although not an elegant solution, this gets the job done for me.

I would still like, however, to get the WINKEY {} action.py module to work.

rh

I must disappoint you. The

I must disappoint you. The WINKEY function seems to work only with one character parameters as choice, so "e" for explorer and "b" for system tray.

I do not know why several things seemed to work yesterday. But the tab character is not stable with this method. It goes all through a dll file "DNSKeys.dll" (in the Unimacro directory, subdirectory "dlls". The README.txt (in that directory) is not completely correct. Restrict calling this DLL with exactly one letter as parameter.

For getting the old style Alt+Tab window fixed on the screen, you could do (I just found out):

Testing windows key = SSK({ctrl+alt+tab});

I wouldn't know how to activate the Flip3D window.

Quintijn

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


Syndicate content