Jump to content

help with send()


Recommended Posts

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

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 key

i 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

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 key

i 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

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 key

i 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

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

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

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 but

if your running vista .. have you tried running ya script as administrator :D ?

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

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...