betatester Posted March 23, 2009 Share Posted March 23, 2009 i need to send a quit command to a program.. the command it needs is INSERT+q i cannot figure how to send both keystrokes together with autoit.. i tried several send("{insert q}") and send("{insert}q") it doesn't work and sends insert first ..i can just send processclose to the program(doesn't have a visible window) but that terminates it leaving its tray icon lagging behind then i use the refresh tray with the mouse on tray trick but not good cause sometimes i'll be using the mouse.. i just want to make it close properly using the weird command it accepts: INSERT+q thanks Link to comment Share on other sites More sharing options...
jvanegmond Posted March 23, 2009 Share Posted March 23, 2009 Send("{insert down}q{insert up}") github.com/jvanegmond Link to comment Share on other sites More sharing options...
youknowwho4eva Posted March 23, 2009 Share Posted March 23, 2009 Darn, beat me to it Manadar. I got distracted by an email, hit refresh and it was already there. Giggity Link to comment Share on other sites More sharing options...
betatester Posted March 23, 2009 Author Share Posted March 23, 2009 Send("{insert down}q{insert up}")nah.. already tried that, it doesn't work at all.. the program(screenreader) stays on running.. i'm not even sure if the down part works with insert Link to comment Share on other sites More sharing options...
youknowwho4eva Posted March 23, 2009 Share Posted March 23, 2009 I'm wondering why you have to use insert to press a key to close a program? Giggity Link to comment Share on other sites More sharing options...
betatester Posted March 23, 2009 Author Share Posted March 23, 2009 I'm wondering why you have to use insert to press a key to close a program?that's the command it accepts.. i wish it had options to assign different(more logical) commands.. i would have thrown any ctrl+ thing to close it but as many screen/voice/visual programs work, for some odd reason they always choose the insert keyi suspect the down up keys work with insert.. because if you test (open an empty notepade file and keep in focus) and manually hit insert+q and then release nothing is send to notepad because it's not a command it understands.. when you use mandar's script , notepad types q.. that means that the down is not affecting insert and q is sent after insert.http://www.nvda-project.org/ Link to comment Share on other sites More sharing options...
jvanegmond Posted March 23, 2009 Share Posted March 23, 2009 Have you tried manually typing {insert down}q{insert up} in Notepad? They give exact same results. AutoIt functions correctly, it is your application that is not willing to cooperate. As for a final solution, I do not have an answer at this time. github.com/jvanegmond Link to comment Share on other sites More sharing options...
betatester Posted March 23, 2009 Author Share Posted March 23, 2009 that's the command it accepts.. i wish it had options to assign different(more logical) commands.. i would have thrown any ctrl+ thing to close it but as many screen/voice/visual programs work, for some odd reason they always choose the insert keyi suspect the down up keys work with insert.. because if you test (open an empty notepade file and keep in focus) and manually hit insert+q and then release nothing is send to notepad because it's not a command it understands.. when you use mandar's script , notepad types q.. that means that the down is not affecting insert and q is sent after insert.http://www.nvda-project.org/ my friend just explained to me why the insert key is mostly preferred in accessibility programs.. for a visually impaired person, it's easier for her to find the insert key on a keyboard because its location is rather unique and distinctive compared to the other keys. Link to comment Share on other sites More sharing options...
DaRam Posted March 23, 2009 Share Posted March 23, 2009 Have you tried ALT F4 ?that's the command it accepts.. i wish it had options to assign different(more logical) commands.. i would have thrown any ctrl+ thing to close it but as many screen/voice/visual programs work, for some odd reason they always choose the insert keyi suspect the down up keys work with insert.. because if you test (open an empty notepade file and keep in focus) and manually hit insert+q and then release nothing is send to notepad because it's not a command it understands.. when you use mandar's script , notepad types q.. that means that the down is not affecting insert and q is sent after insert.http://www.nvda-project.org/ Link to comment Share on other sites More sharing options...
betatester Posted March 23, 2009 Author Share Posted March 23, 2009 Have you tried manually typing {insert down}q{insert up} in Notepad? They give exact same results. AutoIt functions correctly, it is your application that is not willing to cooperate.As for a final solution, I do not have an answer at this time.yeah.. it could be that nva doesn't like the command from autoit? i don't know.. i'll just close the bugger with processclose.thanks mandar Link to comment Share on other sites More sharing options...
betatester Posted March 23, 2009 Author Share Posted March 23, 2009 Have you tried ALT F4 ?it's a screenreader program.. it doesn't have a visible window alt f4 means you need to bring the programs window first in focus before sending such a command(otherwise you don't know what you're closing) and since nva doesn't have windows this is impossible. Link to comment Share on other sites More sharing options...
Thornhunt Posted March 23, 2009 Share Posted March 23, 2009 it's a screenreader program.. it doesn't have a visible window alt f4 means you need to bring the programs window first in focus before sending such a command(otherwise you don't know what you're closing) and since nva doesn't have windows this is impossible.may be a dumb reply butif your running vista .. have you tried running ya script as administrator ? Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D 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