AutoKey on Linux distro (Ubuntu)?

maxd

Head of Complaints (PABs), Senior Forum Moderator
Staff member
Joined
Jan 20, 2004
Location
Saltirelandia
Anyone using AutoKey on a Linux distro? (not AutoHotKey on Windoz, been there done that not the same critter)

I'm having probs with an AutoKey script to change case of text in a variable. AutoKey can apparently do Python code but my feeble -- and ill-informed -- attempts have thus far only frustrated me.

What I'm trying to do is something like this:

Code:
mydate = system.exec_command("date")
mydate.upper()                                      <<------- no worky
keyboard.send_keys(mydate)

Any recommendations would be much appreciated.
 
Ah, typing it made me realise the problem: the upper() method returns a value, it doesn't change the string itself.

So this works:

Code:
mydate = system.exec_command( "date")
keyboard.send_keys( mydate.upper())
 

Users who are viewing this thread

Meister Ratings

Back
Top