Sign in to follow this  
Followers 0
Bart

Send("^c") does not have any result

13 posts in this topic

I have a script that copies selected text from a window.

The script works in most edit windows (like Word, TextPad, Outlook reply message) but not in the one where I need it most! Pushing Ctrl-C in the window works as usual, btw.

Is this a known probem with certain applications?

Does anybody have any tips on getting this to work?

It's driving me crazy!

Bart

Share this post


Link to post
Share on other sites



does it work if you press it on the keybd ?

Yes, it does.

I even tried automating it via the context menu (right mouseclick & c) but that doesn't work either.

And there is another keycombo that I "Send" to the application that does work.

Bart

Share this post


Link to post
Share on other sites

maybe the window doesn't have the focus during the automation attempt? worth a try... :D

Share this post


Link to post
Share on other sites

maybe the window doesn't have the focus during the automation attempt? worth a try... :D

Nope. It has.

I can even show the context menu...

Share this post


Link to post
Share on other sites

Hi,

can you give as some example apps?

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Hi,

can you give as some example apps?

So long,

Mega

It's a CAT tool and I don't think that will help you very much.

Like I said, it does work in several other (more standard) applications.

I was hoping this is some kind of 'known issue' for which there is a 'known workaround', but I guess no such luck... :D

Bart

Share this post


Link to post
Share on other sites

You could try a ContolGetText thingy ...

Thanks for the suggestion, but I am trying to get one word or a string of up to 8 words from a window full of text, so I guess that is not a viable solution...

Funny thing is that if I leave out the Send("^c") and push Ctrl-C before using the hotkey to start the script, everything works well, including the Send("^v") at the end by which the selected text is substituted by some other text.

I really don't understand what can be the problem...

Could it be some kind of automation going on in the background?

Bart

Share this post


Link to post
Share on other sites

Ok, after trying almost everything else :D I found the solution by using the copy function in the Edit menu.

send("!e")
    send("c")

That works! Phewwww...

And I did already try the right-click menu and then c, which didn't work.

Curiouser and curiouser... :wacko:

But I am there!

And I think AutoIt is an absolutely great tool!!!

Bart

Share this post


Link to post
Share on other sites

Ok, after trying almost everything else :D I found the solution by using the copy function in the Edit menu.

May take a look at WinMenuSelectItem() then :wacko:

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

dont know if you tried but for some reason

Send('^C')
;Wouldn't Work
Send('^c') 
;Would Work

idk why but maybe you were using caps.


Share this post


Link to post
Share on other sites

dont know if you tried but for some reason

Send('^C')
;Wouldn't Work
Send('^c') 
;Would Work

idk why but maybe you were using caps.

I had the same problem and this worked for me. Thanks lopolop!!!

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