Run contents from clipboard
Hello!
I would like to ask for your help. I've tried several stuff to no avail. I would like to run a file whose path that is on the clipboard. So, normally I do:
Windows + R
Ctrl + V
Enter
I've tried to do it, but no luck. Any ideas?
Best,
David.
I would like to ask for your help. I've tried several stuff to no avail. I would like to run a file whose path that is on the clipboard. So, normally I do:
Windows + R
Ctrl + V
Enter
I've tried to do it, but no luck. Any ideas?
Best,
David.
Type: Command
Code: Select all
Run, %Clipboard%
Thanks!
Tried that already, and got an error Here is a print screen:
http://prntscr.com/h7by1q
I have tried with other content and it works, it somehow does not work from what I copy from Excel. It seems that excel includes a new line character. Here is a paste from what I copied, with quotes so that it denotes start and end.
"C:\Users\David\Google Drive\Epic Lemon\Clientes\Cambia un destino\social media\concientización\usados\conciencia.jpg
"
I tried something like this to try to "clean" the clipboard, but still does not work. I tried using a pice of code from the example of pasting without formatting. Any thoughts how this can work with this strange formatting from excel?
Thanks so much.
David.
Tried that already, and got an error Here is a print screen:
http://prntscr.com/h7by1q
I have tried with other content and it works, it somehow does not work from what I copy from Excel. It seems that excel includes a new line character. Here is a paste from what I copied, with quotes so that it denotes start and end.
"C:\Users\David\Google Drive\Epic Lemon\Clientes\Cambia un destino\social media\concientización\usados\conciencia.jpg
"
I tried something like this to try to "clean" the clipboard, but still does not work. I tried using a pice of code from the example of pasting without formatting. Any thoughts how this can work with this strange formatting from excel?
Code: Select all
clipboard := clipboard
Run, %Clipboard%
David.
Excel is known for using it's own clipboard management system. Do you have a path in one of Excel cells? You cannot just copy the cell, try to select and copy the text in the editing field.
Alternatively, one way to trim the new line characters from the end of the string is
Alternatively, one way to trim the new line characters from the end of the string is
Code: Select all
Clipboard := RegExReplace(Clipboard, "\r\n$","")
Sleep 200
Run, %Clipboard%
wow, that worked perfectly well. Thanks soooo much!
One additional question
Is there a way to add to the script to copy to clipboard and then execute what I have? Just thinking if I can avoid doing a ctrl + c.
One additional question
Is there a way to add to the script to copy to clipboard and then execute what I have? Just thinking if I can avoid doing a ctrl + c.
Create a shortcut, Type: Command:
If it fails, just increase sleeps.
Code: Select all
Send, ^c
Sleep 100
Clipboard := RegExReplace(Clipboard, "\r\n$","")
Sleep 100
Run, %Clipboard%