Username with Text Expander?

Discussion, questions and support.
Post Reply
pwncpa
Posts: 8
Joined: Sep 20th, ’15, 17:21

Post by pwncpa » Sep 25th, ’15, 22:14

I am trying out Fastkeys for use in our office, and one of my users has an issue with the following text expander script:

{CapsLock}%A_UserName%{CapsLock} %A_ShortDate%

The "trigger" string is when the letters "so" are entered. What happens is the s of the "so" stays in front of the information that is filled out from the script above. I tried to change the Paste Delay in settings, but no luck. Any thoughts? I can provide more specific information if needed.
User avatar
Marko
Posts: 1719
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Sep 25th, ’15, 22:57

Hi and welcome to the forum!

I cannot reproduce the issue on our systems. Does it happen with any abbreviation string? You can send me your settings.fdb file and I will see what might be the problem.
pwncpa
Posts: 8
Joined: Sep 20th, ’15, 17:21

Post by pwncpa » Sep 26th, ’15, 19:26

Thanks Marko! I am trying to diagnose this a little more, as I am not getting the error, but the other user here is. I will send over more info if needed. But, while I've got you, I am having fastkeys insert the %A_UserName% on one of the expansion scripts. Where does fastkeys get this value? Are there any other values that could be selected? For instance, I would love to use the user's first initial and last name, or the user's initials?
User avatar
Marko
Posts: 1719
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Sep 26th, ’15, 23:20

A_UserName is a system variable - Windows user logon name. You can find more system variables in a Library or by pressing More button - Macros/System Variables...

For initials you can make a simple command (Type=Command):

Code: Select all

StringSplit, str, A_UserName, %A_Space%
Send % Substr(str1,1,1) Substr(str2,1,1) Substr(str3,1,1)
pwncpa
Posts: 8
Joined: Sep 20th, ’15, 17:21

Post by pwncpa » Oct 6th, ’15, 17:52

Marko - What I am hoping to do is have a Text Expander script insert a user's initials and date, like "PWN 10/6/2015". I would like to have all users accessing the same definition file, so that if I make changes to the file, it propagates to all users. So, we have to use a system variable to pull in the initials. I have done a little research into this, and based on your note above, it looks like the user logon name is just a person's first name only, based on the definitions in our domain. I have looked at the user properties on our server, and the User Login Name is just a user's first name, but there is a place on the "general" tab where a user's last name and initials are entered. Is there anyway to access that? Is there any other way to have FastKeys access a user's full name, even though it seems like only the "User Logon" name is coming over from the domain? I hope this makes sense - I am not a network admin, but a guy who understands enough to get into trouble. Thanks!
User avatar
Marko
Posts: 1719
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Oct 9th, ’15, 10:32

pwncpa wrote:

I would like to have all users accessing the same definition file, so that if I make changes to the file, it propagates to all users. So, we have to use a system variable to pull in the initials.
A_UserName will retrieve a logon name of the user who started FastKeys even if definition file is shared.
pwncpa wrote:

Is there any other way to have FastKeys access a user's full name.
Sorry, I have no idea how to do this.
Post Reply