gehonglin Posted April 2, 2008 Share Posted April 2, 2008 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 More sharing options...
weaponx Posted April 2, 2008 Share Posted April 2, 2008 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 More sharing options...
LarryDalooza Posted April 2, 2008 Share Posted April 2, 2008 Logged in as that person... check that setting. Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
gehonglin Posted April 3, 2008 Author Share Posted April 3, 2008 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 More sharing options...
LarryDalooza Posted April 3, 2008 Share Posted April 3, 2008 Perhaps Windows recognizes that the hotkey is already assigned and dynamically uses a different assignment. Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
gehonglin Posted April 3, 2008 Author Share Posted April 3, 2008 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 More sharing options...
gehonglin Posted April 3, 2008 Author Share Posted April 3, 2008 I found it strange. It seems only hotkeys - CTRL+SHIFT, CTRL+ALT are contrary to system setting when using RunAsSet, other hotkeys are normal. Is it possibly a bug in AutoIt? Link to comment Share on other sites More sharing options...
weaponx Posted April 3, 2008 Share Posted April 3, 2008 Did you check these settings whiule logged in under user "aaaa"?? Link to comment Share on other sites More sharing options...
gehonglin Posted April 3, 2008 Author Share Posted April 3, 2008 Yes, the setting is the same with other accounts. Link to comment Share on other sites More sharing options...
LarryDalooza Posted April 3, 2008 Share Posted April 3, 2008 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. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
gehonglin Posted April 3, 2008 Author Share Posted April 3, 2008 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 More sharing options...
LarryDalooza Posted April 3, 2008 Share Posted April 3, 2008 try using the "option" parameter of RunAsSet ... do NOT load the profile ... try maybe option 0 Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
gehonglin Posted April 7, 2008 Author Share Posted April 7, 2008 i have tried option 0, 1, 2 in RunAsSet. But the hotkey is still ALT + SHIFT, contrary to the system settings. Link to comment Share on other sites More sharing options...
herewasplato Posted April 7, 2008 Share Posted April 7, 2008 (edited) 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 April 7, 2008 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
gehonglin Posted April 8, 2008 Author Share Posted April 8, 2008 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 More sharing options...
herewasplato Posted April 8, 2008 Share Posted April 8, 2008 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now