| View previous topic :: View next topic |
| Author |
Message |
zorglups
Joined: 04 Feb 2005 Posts: 22
|
Posted: Sat Feb 05, 2005 10:27 pm Post subject: How to disable the "Files are considered to be text&quo |
|
|
| 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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Sun Feb 06, 2005 12:05 am Post subject: Re: How to disable the "Files are considered to be text |
|
|
| 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 |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Sun Feb 06, 2005 12:29 am Post subject: |
|
|
| 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 |
|
 |
zorglups
Joined: 04 Feb 2005 Posts: 22
|
Posted: Sun Feb 06, 2005 11:28 pm Post subject: |
|
|
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
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
Pierre |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Mon Feb 07, 2005 12:59 am Post subject: |
|
|
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.  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Mon Feb 07, 2005 1:14 am Post subject: |
|
|
| zorglups wrote: | | The EditPaste can be interresting but is there an 'EditCopy' ? |
The closest thing is probably:
ControlGet, OutputVar, Selected,, WinTitle |
|
| Back to top |
|
 |
zorglups
Joined: 04 Feb 2005 Posts: 22
|
Posted: Mon Feb 07, 2005 11:29 am Post subject: |
|
|
| Thanks. |
|
| Back to top |
|
 |
|