Manus-Magnus Posted February 10, 2004 Share Posted February 10, 2004 (edited) Hello: First tx you for Autoit again, but.... I absolutly need the 0.92 now, since it have the pixel search step, problem is the down/up keys presses dont "pass" into my app. I tested so much...nope cant do it: AutoItSetOption("SendKeyDownDelay", 10) AutoItSetOption("SendKeyDelay", 10) $key = "SPACE" Sleep (3000) Send ("{" & $key & " DOWN" & "}") sleep (3000) Send ("{" & $key & " UP" & "}") this one ending by pushing " " in the game (at the start).* Send ("{" & $key & "DOWN" & "}") sleep (3000) Send ("{" & $key & "UP" & "}") This one press 2 times "S" (at the start, at the end)* *saw this using a console available in application Of course i tried "a down" or "A DOWN" or "space down" or "SPACE down" ect... simply dont work. (including "standards ALT, SHIFT, etc...) it's about the d2 game application (i think alot people are aware about this game here ) IMPOSSIBLE to down a key, wait , and release up with >.091 autoit versions. Send("{SPACE}") works, but the down/up is essential.... So im blocked 0.91 until it's fixed (if it's fixed a day...) edit: of course i tried to tweak delays... of autoit options... Edited February 10, 2004 by Manus-Magnus http://www.premiumwanadoo.com/manus-magnus/ Link to comment Share on other sites More sharing options...
scriptkitty Posted February 10, 2004 Share Posted February 10, 2004 (edited) I don't quite understand your question, but did you try changing these delays?The new delays changed a few things in my scripts, but after adjusting these, I was able to get it to work more realiably and faster in a few programs.AutoItSetOption("SendKeyDelay", 10) ;10 millisecondsAutoItSetOption("SendKeyDownDelay", 10) ;10 millisecondsMaybe this meant you did adjust them.edit: of course i tried to tweak delays... of autoit options... Edited February 10, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 10, 2004 Administrators Share Posted February 10, 2004 Are you saying it DID work in .91? I tested .92 in a couple of games and it seemed fine holding keys down. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Valik Posted February 10, 2004 Share Posted February 10, 2004 Things seem to work fine for me with 3.0.93 (Unstable). Does it work in the game? Holding down a key in notepad doesn't really do the same thing as holding down a key physically (For me at any rate). However, I tried simulating holding the ALT key down and saw that it was being held down. Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 10, 2004 Administrators Share Posted February 10, 2004 Yeah that's right, you can't see it in windows because it doesn't "repeat" but for things that check physical states it seems to work. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Manus-Magnus Posted February 10, 2004 Author Share Posted February 10, 2004 (edited) AutoItSetOption("SendKeyDownDelay", 10) ;10 milliseconds i tried 0, 1, 10, 100, 1000 etc... im just bored... cant continue my soft without this working ... Windows XP, SP1a, 2.6ghz, i think my OS is so standard. I tried too on my P400 (same os/pack) AutoItSetOption("SendKeyDownDelay", 300) ;10 milliseconds AutoItSetOption("SendKeyDelay", 300) ;10 milliseconds ;$key = "SPACE" Sleep (3000) ;Send ("{" & $key & " DOWN" & "}") ;sleep (3000) ;Send ("{" & $key & " UP" & "}") ;Sleep (2000) Send ("{a down}") sleep (3000) Send ("{a up}") Sleep (2000) same result, dont work at all. the 2 are standard keyboards. Argh , doesnt Autoit should simply press the key and hold it ? logically there should not have any problem with this... And yes, in pad it will NOT make that: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa since i let it down a few time... but just: a <---- note this one have been done by the script wrote up. it's not "real" keypresses, i dunno how it was coded, maybe it simulate windows down and up by an olbvious way i dont know... but it's not an "as it was if a human does it" and btw it make possible in some apps it doent work. What is the DAMN difference between 0.91 and 0.92+ ??? tell me, what is it ? EDIT: should i have to try without my blackbox (switch for these 2 comps) ? Edited February 10, 2004 by Manus-Magnus http://www.premiumwanadoo.com/manus-magnus/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 10, 2004 Administrators Share Posted February 10, 2004 Try the unstable I just uploaded. Saw a potential problem with keys like a,b,c, etc. I _did_ ask in the bots forum for people to test .92 in games before I released it - not a single reply so go rant at them if you want to rant. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Manus-Magnus Posted February 10, 2004 Author Share Posted February 10, 2004 (edited) The unstable give same probleme. Well, it's only a game, but it give me nice project and fun to learn programing & algo, since i didnt know what was a "select" 1 year ago, and now have a 5000 lines "game" program and some stuff at job. I dont understand 'rant' cant translate it... if you want i will try to ask some users to test that on their comps. But Tell me if you are bored. AutoItSetOption("SendKeyDownDelay", 100) AutoItSetOption("SendKeyDelay", 100) Winactivate ("Diablo II","") sleep (2000) Send ("{a down}") sleep (15000) Send ("{a up}") Sleep (500) I noted that: and maybe it will help you: it seems to "stuck"/"blocking" they key during the 15 seconds. like it was already pressed down but without the desired effect. once i pressed down a second time the key seemed unlocked. well, sorry Edited February 10, 2004 by Manus-Magnus http://www.premiumwanadoo.com/manus-magnus/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 10, 2004 Administrators Share Posted February 10, 2004 Only other thing I can thing of that has changed, i've removed in this special version: http://www.hiddensoft.com/autoit3/files/un...autoit3_mag.exe Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Manus-Magnus Posted February 10, 2004 Author Share Posted February 10, 2004 (edited) ... and your special version works like a charm.... - it's a .93 modified ? - can i compile with this ? - is it possible to explain in few words what is the difference ? oh hell... i will learn C only to know what you have changed Edited February 10, 2004 by Manus-Magnus http://www.premiumwanadoo.com/manus-magnus/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 10, 2004 Administrators Share Posted February 10, 2004 Try downloading the full unstable version again. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Manus-Magnus Posted February 10, 2004 Author Share Posted February 10, 2004 working.... tested it on my 2 comps... (and if you can put 2 or 3 words to finish off the thing... by explaining what it was... ) http://www.premiumwanadoo.com/manus-magnus/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 10, 2004 Administrators Share Posted February 10, 2004 - is it possible to explain in few words what is the difference ?I added lots of code to make ControlSend() much better, part of this was to attach input queues of all the windows I was interested in - this was also done for Send() as it didn't seem to cause any problems. At the end of the Send() command the input queues were detached again and this process seemed to release the key so it wasn't held down. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 11, 2004 Administrators Share Posted February 11, 2004 I had to add some of the code back in as without it there are problems under NT4. I think I've got a balance though. Please re-try the current unstable. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Manus-Magnus Posted February 12, 2004 Author Share Posted February 12, 2004 i tried unstable : autoit-v3.0.93-beta.exe 11-Feb-2004 09:19 808k Is passing very well throught my olbvious application. Work very well now ! http://www.premiumwanadoo.com/manus-magnus/ 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