Jump to content

Bug for RunAsSet


Recommended Posts

I found a keyboard bug when using the following script:

RunAsSet("aaaa", @computername, "123")

RunWait("NotePad.exe")

The NotePad is opened by AutoIt in this way, the key to change input languages (keyboard layout) is ALT+SHIFT;

But when the NotePad is opened by me directly, the key is CTRL+SHIFT.

Does anyone know how to solve this problem? thanks.

Link to comment
Share on other sites

I see the settings under:

Control Panel > Regional and Language Options > Languages > Details > Key Settings > Change Key Sequence

This should be a global setting and not effected by RunAsSet()

Link to comment
Share on other sites

hi weaponx,

I set the hotkeys under:

Control Panel > Regional and Language Options > Languages > Details > Key Settings > Change Key Sequence

but I found it strange, when using RunAsSet("aaaa",@ComputerName,"123"), the hotkeys is contrary to above setting.

if the system setting is CTRL+SHIFT, the result using RunAsSet will be ALT+SHIFT.

if the system setting is ALT+SHIFT, the result using RunAsSet will be CTRL+SHIFT.

Do you have any idea about this?

Link to comment
Share on other sites

dear LarryDalooZa,

if I just use the following script:

RunWait("NotePad.exe")

then the hotkey is the same as system setting.

but if i use:

RunAsSet("aaaa", @computername, "123")

RunWait("NotePad.exe")

the hotkey is always contrary to system settings.

Do you have any idea to help to resolve this problem? thank you.

Link to comment
Share on other sites

You have 2 users logged in ... yourself and the runnasset person ...

Each user is trying to set the Global hotkey ... they both can't set the same key ...

it is going to be some derivative of the above...

try Running...

RunAsSet("aaaa", @computername, "123")

RunWait("control intl.cpl")

and look at the languages\details\key sequence ... stuff ...

It should never be the same as the control intl.cpl that is run as yourself...

Anyway, I can see your problem in my head, but I cannot relay it well...

Good luck.

Lar.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Link to comment
Share on other sites

You have 2 users logged in ... yourself and the runnasset person ...

Each user is trying to set the Global hotkey ... they both can't set the same key ...

it is going to be some derivative of the above...

try Running...

RunAsSet("aaaa", @computername, "123")

RunWait("control intl.cpl")

and look at the languages\details\key sequence ... stuff ...

It should never be the same as the control intl.cpl that is run as yourself...

Anyway, I can see your problem in my head, but I cannot relay it well...

Good luck.

Lar.

thanks LarryDalooZa, I tried your code, and the system settings for the input language is as same as what i opened by myself.

My problem still exists.....

When using:

RunAsSet("aaaa", @computername, "123")

RunWait("NotePad.exe")

it seems that one of the two hotkeys(CTRL+SHIFT and CTRL+ALT) will be disabled, meanwhile, the enabled hotkey will be contrary to the system settings.

Anybody has any good idea for resolving this problem? thanks.

Link to comment
Share on other sites

What happens if you manually use the "Run As" function of your Operating System (OS)?

What OS are you having this problem with?

Edit: I could not duplicate your problem using XP Pro SP3 RC2 (5508).

The OS "Run As"...

AutoIt's RunAsSet...

Manually opening notepad...

...all three gave the same results.

I tried:

RunAsSet("aaaa", @computername, "123")
RunWait("notepad")oÝ÷ Ù©Ýjëh×6RunAsSet("aaaa", @computername, "123")
Run("notepad")
Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Thanks herewasplato. My Operating System is XP Pro SP2 ( 5.1.2600 Service Pack 2 Build 2600).

I tried three methods as you done:

The OS "Run As"...

AutoIt's RunAsSet...

Manually opening notepad...

The first and second methods give the same results, but are different from the third.

Link to comment
Share on other sites

Then AutoIt is doing what it is supposed to - simulating your OS conditions.

I see nothing on MS TechNet about this - but it was only a quick search.

Maybe others here have a clue how your OS is doing this.

Do you have other computers that you can test this on?

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...