p3kautoit Posted April 12, 2010 Share Posted April 12, 2010 (edited) Hi, I made a small script, but when I tried it, the first letter was sometimes missing. Can somebody help, where is the problem. I have read that in older version was same problem. Here is the script: While 1 HotKeySet("!a", "admin") WEnd Func admin() Sleep(500) Send("admin") EndFunc Thank for your help. Peter Edited April 12, 2010 by p3kautoit Link to comment Share on other sites More sharing options...
Nurav Posted April 12, 2010 Share Posted April 12, 2010 first letter of what? Any way it works perfectly fine for me. Link to comment Share on other sites More sharing options...
Negative1 Posted April 12, 2010 Share Posted April 12, 2010 The only problem I see is HotKeySet should not be in the while loop: HotKeySet("!a", "admin") While 1 Sleep(50) WEnd Func admin() Sleep(500) Send("admin") EndFunc What are we going to do tonight Brain?Same thing we do every night Pinky try to automate the world. Link to comment Share on other sites More sharing options...
l3ill Posted April 12, 2010 Share Posted April 12, 2010 also dropping letters can sometimes be fixed by wrapping the send in sleeps(250) Sleep(250) Send("Something") Sleep(250) My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example     Link to comment Share on other sites More sharing options...
p3kautoit Posted April 13, 2010 Author Share Posted April 13, 2010 I have corrected the script but still same problem. The "a" letter is sometimes missing, when I try this shortcat in Notepad HotKeySet("!a", "admin") While 1 Sleep(50) WEnd Func admin() Sleep(250) Send("admin") Sleep(250) EndFunc Link to comment Share on other sites More sharing options...
Makaule Posted April 13, 2010 Share Posted April 13, 2010 beside of using Send, you could try use ClipPut and and ClipGet. Link to comment Share on other sites More sharing options...
omikron48 Posted April 13, 2010 Share Posted April 13, 2010 I think it's because the hotkey you set is 'a' and one of the characters you are sending is also 'a'. Try setting to a different hotkey key. Link to comment Share on other sites More sharing options...
p3kautoit Posted April 13, 2010 Author Share Posted April 13, 2010 The problem is with different letter too. I thing I have found the problem, but I don't know the solution. The problem is because in the HotKeySet is ALT+a , and after pressing ALT+a and leave it, the ALT is rememberd for AutoIt as activ, and therfore don't write first letter. It is sensitive how you press ALT+a (quickly, longer ...) I have tried put Send("{ALTUP}") but it doesn't helped. Have anybody any suggestion? Link to comment Share on other sites More sharing options...
Malkey Posted April 13, 2010 Share Posted April 13, 2010 You could try this method.#include <Misc.au3> HotKeySet("!a", "admin") HotKeySet("{ESC}", "Terminate") While 1 Sleep(10) WEnd Func admin() While _IsPressed("12") Or _IsPressed("41") ; Alt + a Sleep(10) WEnd Send("admin") EndFunc ;==>admin Func Terminate() Exit 0 EndFunc ;==>Terminate Link to comment Share on other sites More sharing options...
p3kautoit Posted April 14, 2010 Author Share Posted April 14, 2010 The problem doesn't solved. I will change the ALT to CTRL. I've used before AHK (AutoHotKey) software, and there is working fine. I think that it's problem AutoIt with "ALT" 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