AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to disable the "Files are considered to be text&quo

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
zorglups



Joined: 04 Feb 2005
Posts: 22

PostPosted: Sat Feb 05, 2005 10:27 pm    Post subject: How to disable the "Files are considered to be text&quo Reply with quote

Quote:
Files (such as those copied from an open Explorer window with Control-C) are considered to be text: They are auto-converted to their filenames (with full path) whenever the clipboard variable is referenced in the script.


Can this be disabled ?
Or is there a way to detect if the current selection is a text ?

I would like to send a ^{INSERT} only when some text is selected and not when files are selected in explorer.

Also, is there any way to copy and paste without sending keystrokes (^c or ^{INSERT} / ^v or +{INSERT})

I ask this because some applications will accept the ^c only while other will accept the ^{INSERT} only and I want to avoid to maintain exception lists.

Thanks for the support.

Pierre.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10474

PostPosted: Sun Feb 06, 2005 12:05 am    Post subject: Re: How to disable the "Files are considered to be text Reply with quote

zorglups wrote:
Quote:
Files (such as those copied from an open Explorer window with Control-C) are considered to be text:
Can this be disabled ?
Or is there a way to detect if the current selection is a text ?
There is no way to disable it. You could detect the presence of something non-text (such as files) by doing a ^v in an editor (or a "Control EditPaste" as mentioned below). If nothing appears but the clipboard is not blank (i.e. "if clipboard <>"), that means the clipboard contains files.

Quote:
is there any way to copy and paste without sending keystrokes (^c or ^{INSERT} / ^v or +{INSERT})

I ask this because some applications will accept the ^c only while other will accept the ^{INSERT} only and I want to avoid to maintain exception lists.
Other than using WinMenuSelectItem to choose Edit->Paste (which is probably worse ^v or ^{Insert}), you can use the following if the target control is an Edit control or something similar:
Code:
ControlGetFocus, FocusedControl, A
if ErrorLevel <> 0
    Control, EditPaste, %Clipboard% (or any other variable), %FocusedControl%, A
Back to top
View user's profile Send private message Send e-mail
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Sun Feb 06, 2005 12:29 am    Post subject: Reply with quote

Interesting. I was aware of +Insert before, but I never knew it's counterpart, ^Insert. It will be added to the hotkey list.
Back to top
View user's profile Send private message
zorglups



Joined: 04 Feb 2005
Posts: 22

PostPosted: Sun Feb 06, 2005 11:28 pm    Post subject: Reply with quote

Thanks for the reply.

The EditPaste can be interresting but is there an 'EditCopy' ?

For the +{Insert} / ^{Insert}, it is needed in case you are Unix system admin because the traditional ^c will just send a break to your telnet application Rolling Eyes

For the story, the first shortcuts were +{Insert} / ^{Insert} / +{Delete}
Then, ^v ^c ^x came (I think with W95). My guess is that it is to ease the typo for those able to type with their 10 fingers Confused

Pierre
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Mon Feb 07, 2005 12:59 am    Post subject: Reply with quote

Ah... +Delete... that's the missing one I was looking for. I thought Ctrl + X was getting kinda lonely. Thanks for inadvertently improving my hotkey list. Smile
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10474

PostPosted: Mon Feb 07, 2005 1:14 am    Post subject: Reply with quote

zorglups wrote:
The EditPaste can be interresting but is there an 'EditCopy' ?

The closest thing is probably:
ControlGet, OutputVar, Selected,, WinTitle
Back to top
View user's profile Send private message Send e-mail
zorglups



Joined: 04 Feb 2005
Posts: 22

PostPosted: Mon Feb 07, 2005 11:29 am    Post subject: Reply with quote

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group