Sign in to follow this  
Followers 0
Guest Spokey

Autoit for disabled

6 posts in this topic

Could someone please offer assistance to a software illiterate.

I am trying to help a friend who is visually impaired. He uses a program

called SAYZME to read text for him. Could someone show me what script

he could use to Select All text in the current window (eg open email window)

and copy it to the clipboard. I have tried using the send command but have

spent hours and got no where.

Thanks.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Could someone please offer assistance to a software illiterate.

I am trying to help a friend who is visually impaired. He uses a program

called SAYZME to read text for him. Could someone show me what script

he could use to Select All text in the current window (eg open email window)

and copy it to the clipboard. I have tried using the send command but have

spent hours and got no where.

Thanks.

<{POST_SNAPBACK}>

AutoItSetOption("WinTitleMatchMode", 4)
;mode four allows for the use of "last" in the next line

WinActive("last"); not sure that this line does anything
;activates the last active window - maybe, see manual
;start script without making the desired window lose focus
;something like a shortcut key or voice command launch 

Send("^a")
;sends a control-a which selects all in MOST applications

Send("^c")
;sends a control-c which "copies selected" in MOST applications

Send("{HOME}")
;removes the "select all" state
;perhaps other keys would be safer to send
Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Thanks for the code, but it just doesn't seem to work for me.

Am I using it wrong? I was producing the .exe file and adding

it to my Quick Launch toolbar. I open an email, or notepad text

and then click on the Quick launch. The Autoit icon appears for a moment

in the sys tray but nothing else happens. The previous window is not

reactivated and the clipboard doesn't change. Any advice?

Share this post


Link to post
Share on other sites

Thanks for the code, but it just doesn't seem to work for me.

Am I using it wrong? I was producing the .exe file and adding

it to my Quick Launch toolbar. I open an email, or notepad text

and then click on the Quick launch. The Autoit icon appears for a moment

in the sys tray but nothing else happens. The previous window is not

reactivated and the clipboard doesn't change. Any advice?

<{POST_SNAPBACK}>

try this one:

HotKeySet ("{PRINTSCREEN}","go")
HotKeySet ("^!q","quit")

while 1
    Sleep(250)
WEnd

Func go()
    Send("^a")
    Send("^c")
    Send("{HOME}")
EndFunc

Func quit()
    Exit
EndFunc

run it, open whatever you want and press Printscreen

press CTRL+ALT+Q to terminate

take a look at the sendkey list in au3helpfile to costumize the hotkeys...


CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

Thanks for the code, but it just doesn't seem to work for me.

Am I using it wrong? I was producing the .exe file and adding

it to my Quick Launch toolbar. I open an email, or notepad text

and then click on the Quick launch. The Autoit icon appears for a moment

in the sys tray but nothing else happens. The previous window is not

reactivated and the clipboard doesn't change. Any advice?

<{POST_SNAPBACK}>

@Spokey,

I ran the code on several applications before posting it, but I launched the script via an operating system (OS) shortcut with an OS shortcut key assigned. I suspect that using (clicking on) quick launch shortcut causes the window that you wanted to copy text from to lose focus and the control-a and control-c were sent elsewhere. Since it did not work for you - that confirms my fears that this line, ---WinActive("last")--- has no effect (it only works as documented - imagine that). I should have tested the code on a window that I intentionally took out of focus... but I was not that smart that morning... Anyway, piccaso's code is much better. This assumes that pressing ctrl-a and ctrl-c is not easy for your friend.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Thanks Guys,

all help is very much appreciated. Picasso's code works like a dream.

I'll be able to offer this code to others in the disabled community who have problems with multiply keypresses etc.

Thanks Again.

Over and out.

:(

Share this post


Link to post
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
Sign in to follow this  
Followers 0