Sign in to follow this  
Followers 0
dost0011

Get more Windows Files

3 posts in this topic

Hi,

simular to CopyPath I need a tool that copies the originally Files from Shortcuts to the Clipboard.

Now it works with only one Shortcut.

--> Run the skript once

--> Right click on a shortcut and "Copy File from Clipboard"

--> Clipboard is filled with the File :-)

But if I mark more than one File and say "Copy File from Clipboard" I get only one File. Why ?

Many thanks !

Stephan

P.S: I have the bugfixed function _ClipPutFile:

http://www.autoitscript.com/forum/index.php?showtopic=60629

#include <misc.au3>

If $CmdLine[0] = "0" Then

    If Not StringInStr(RegRead("HKEY_CLASSES_ROOT\*\shell\Copy File from Link to Clipboard\Command", ""), @ScriptFullPath) Then
        MsgBox(0,"Installation","Installiere Programm!")
        _InstallHere()
    endif
Else
    _ClipPutFile($CmdLine[1])   
EndIf

Func _InstallHere()
    $sScriptPathReg = @ScriptFullPath & " " & Chr(34) & "%1" & Chr(34)
    RegWrite("HKEY_CLASSES_ROOT\*\shell\Copy File from Link to Clipboard\COMMAND", "", "REG_SZ", $sScriptPathReg)
    MsgBox(0,"Installation","Eintrag in Registry erfolgreich angelegt")
EndFunc;==>_InstallHere

Share this post


Link to post
Share on other sites



instead of

Else
    _ClipPutFile($CmdLine[1])   
EndIf

try

Else
  For $i = 1 To $CmdLine[0]
     _ClipPutFile($CmdLine[$i])
  Next
EndIf

But you may accomodate basic princip to your needs ...

Share this post


Link to post
Share on other sites

Thanks - but it doesn't work.

I always get one Result back if I mark several Windows Files.

Do I have to change this in the Registry ?

C:\Programme\AutoIt3\Examples\eigene_skripts\Tools\Clipboard.exe "%1"

It comes from:

$sScriptPathReg = @ScriptFullPath & " " & Chr(34) & "%1" & Chr(34)

RegWrite("HKEY_CLASSES_ROOT\*\shell\Copy File from Link to Clipboard\COMMAND", "", "REG_SZ", $sScriptPathReg)

Any ideas ?

Thanks.

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