It is currently October 15th, 2021, 11:44 pm

Drag&Drop[V 3.1.3] - Drag and drop functionallity in Rainmeter, now with even more fancyness!

Share and get help with Plugins and Addons
3rdTraveler
Posts: 2
Joined: April 26th, 2017, 6:51 pm

Re: Drag&Drop[V 3.1.3] - Drag and drop functionallity in Rainmeter, now with even more fancyness!

Post by 3rdTraveler »

theAzack9 wrote:While eclectic-tech already mostly answered this i thought i should just make a heads up anyways.

While i don't think the bugs in this plugin is major i would probably advice you to wait just a little longer until i'm done with the new version. (I hope to be done around next week, it isn't really that much more to do, but i have a lot of exams coming up)

There is no and probably won't be any way to rename a copied file as that is not really what i personally want this plugin to do. I do not say that this will never happen, but i'm at least against it currently. However, it is certainly possible to do with some other tool. The OnDropAction should be executed after the file itself is moved, which means that you can use the $File$ substitution to rename the file after you copied it. (E.g using the CommandMeasure with something like "rename $File$ "MyName")

You full permission to publish a skin with this plugin attached :) (I added a comment under the redistributable in case anyone in the future is confused about this)
You can download the redistributable zip file and it contains both the x32 and the x64 version you need in order to bundle it with your skin.
Thank you very much TheAzack 9, oh, ok, That's exactly wath I needed to know, I had the doubt if it could rename a file, Now I understand more. I will try to do it in some way like you said, maybe with CMD or VBS. I'll let you know if I publish any skin with your plugin, I'm still working on it. Thanks, Good Look with your exams!
User avatar
Joker73
Posts: 14
Joined: May 17th, 2017, 6:04 pm

Re: Drag&Drop[V 3.1.3] - Drag and drop functionallity in Rainmeter, now with even more fancyness!

Post by Joker73 »

Hi! I'm creating a dock and one icon should be the recycle bin and I'd like to drag and drop files as I do with the Windows bin. I've used this code on my icon but it doesn't work. Any idea?

Code: Select all

[Ico8]
[RecycleBin]
Measure=Plugin
Plugin=RecycleManager
RecycleType=Count

[DragAndDrop]
Measure=Plugin
Plugin=DragAndDrop
Confirm=FALSE

[RecycleBinEmpty]
Meter=Image
MeterStyle=Ico2
ImageName=dropbox.png
W=50
H=50
Hidden=0
LeftMouseUpAction=!CommandMeasure RecycleBin OpenBin
RightMouseUpAction=NOTHING
DymamicVariables=1

[RecycleBinFull]
Meter=Image
MeterStyle=Ico2
ImageName=alvaro.png
W=50
H=50
Hidden=1
LeftMouseUpAction=!CommandMeasure RecycleBin OpenBin
RightMouseUpAction=!CommandMeasure RecycleBin EmptyBin
DymamicVariables=1

[BinCheck]
Measure=Calc
Formula=RecycleBin
IfAboveValue=0
IfAboveAction=[!HideMeter RecycleBinEmpty][!ShowMeter RecycleBinFull][!Redraw]

[BinCheck2]
Measure=Calc
Formula=RecycleBin
IfEqualValue=0
IfEqualAction=[!HideMeter RecycleBinFull][!ShowMeter RecycleBinEmpty][!Redraw]
User avatar
theimmersion
Posts: 55
Joined: November 27th, 2016, 1:51 pm

Re: Drag&Drop[V 3.1.3] - Drag and drop functionallity in Rainmeter, now with even more fancyness!

Post by theimmersion »

What about some functions to retrieve the source file location of a dropped shortcut and its icons?
If i was to make a dock, id need a function like those of FileView, only i need the ability to retrieve not just the dropped file location but instead its source location if its a shortcut and id need to extract its icon. With those functions i could make a dock just like rocket dock, and im pretty sure with what rainmeter is and can do, the rainmeter dock would be superior to any dock out there. FileView comes close but if only it could be targeted to a single file or folder directly.
I made some launchers/docks but you need to set the paths either manually editing the skins ini file for the icons and paths or, as i did, use AHK to execute windows native file picker and save the resulting path to the skins config and refresh the skin.
The problem im having with that approach is that its not intuitive at all imo. The manual editing being the least intuitive but i dont like the external file or folder picker either. One must still go through ProgramFiles etc and so much complicated coding to connect rainmeter and autohotkey when all you could do is drop a file on a box and it would retrieve the the source target path and with it the icon and icon size that you set and display it. Just a thought. In mean time, ill try rainmeter with Drag&Drop to get the file location from the files that are dropped on desktop and see if i can use AHK to get its source target instead.
Because thats what bugged me the most, i wanted any shortcuts on any dock to be linked to the source so i could delete the shortcuts. Thats what bugs me on all the docks, those shortcuts. LOL, maybe im nitpicking but still, ill a user should do is drop a shortcut and delete it afterwards and let the software do the rest. xD
Maybe im missing something, maybe someone has an idea. Lets brainstorm!

In case i didnt tell you, this plugin is AWESOME. BTW, why no rename function? I dont want to replace files blindly, it would be nice if there was a way to make a pop up to replace or rename a file. Asking because im using launchers a lot. Theres not a single shortcut on my desktop other than work in progress skins all over the place. Everything else is launchers and docks. xD
User avatar
theimmersion
Posts: 55
Joined: November 27th, 2016, 1:51 pm

Re: Drag&Drop[V 3.1.3] - Drag and drop functionallity in Rainmeter, now with even more fancyness!

Post by theimmersion »

Ok, been fiddling around for a while now and i cant figure it out. Something is not right with this plugin or instructions are unclear. xD

How on earth can i have two drag and drop places in one skin without affecting all the variables?

Heres my skin:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
MouseActionCursor=1
ContextTitle=Open Icon Folder
ContextAction=["#@#Icons"]
ContextTitle2=Save
ContextAction2=[!WriteKeyValue "Variables" "vFilePathA" "#vFilePathA#"] [!WriteKeyValue "Variables" "vFilePathB" "#vFilePathB#"]

MouseOverAction=[!UpdateMeterGroup "Refresh"] [!UpdateMeasureGroup "Refresh"] [!Redraw]
RightMouseUpAction=!Refresh

[Variables]
R=[!UpdateMeterGroup "Refresh"] [!UpdateMeasureGroup "Refresh"] [!Redraw]
vFilePathA=NULL
vFilePathB=NULL

[Debug]
Meter=String
Text=DragNDropA: [DragNDropA]#CRLF#vFilePathA: #vFilePathA##CRLF##CRLF#DragNDropB: [DragNDropB]#CRLF#vFilePathB: #vFilePathB#
FontColor=255,255,255
SolidColor=0,0,0
Group=Refresh
DynamicVariables=1

;------
; A
;------

[DragNDropA]
Measure=Plugin
Plugin=Drag&Drop
Action=None
;Bounds=PlaceHolderA
;OnDropAction=[!SetVariable "vFilePathA" "$File$"] #R#

[DragNDropAChild]
Measure=Plugin
Plugin=Drag&Drop
Action=Path
Parent=DragNDropA
Bounds=PlaceHolderA
OnDropAction=[!SetVariable "vFilePathA" "$File$"] #R#

[PlaceHolderA]
Meter=Shape
Shape=Rectangle 150,50,100,100,100| Fill Color 0,0,0,100 | StrokeWidth 2 | Stroke Color 100,100,100,255
Group=Refresh
DynamicVariables=1

[ImageA]
Meter=Image
;MeasureName=DragNDrop
ImageName=#vFilePathA#
;SolidColor=0,0,0,1
X=150
Y=50
PreserveAspectRatio=1
Group=Refresh
DynamicVariables=1


;------
; B
;------

[DragNDropB]
Measure=Plugin
Plugin=Drag&Drop
Action=None
;Bounds=PlaceHolderB
;OnDropAction=[!SetVariable "vFilePathB" "$File$"] #R#

[DragNDropBChild]
Measure=Plugin
Plugin=Drag&Drop
Action=Path
Parent=DragNDropB
Bounds=PlaceHolderB
OnDropAction=[!SetVariable "vFilePathB" "$File$"] #R#

[PlaceHolderB]
Meter=Shape
Shape=Rectangle 300,50,100,100,10| Fill Color 0,0,0,100 | StrokeWidth 2 | Stroke Color 100,100,100,255
Group=Refresh
DynamicVariables=1

[ImageB]
Meter=Image
;MeasureName=DragNDrop
ImageName=#vFilePathB#
;SolidColor=0,0,0,1
X=300
Y=50
PreserveAspectRatio=1
Group=Refresh
DynamicVariables=1
Tried two parent approach.
Tried one parent, two children approach.
Tried, as you can see, two parents and two children approach.
But still it wont work, it sets the path to both variables even tho an image is being dropped on only one of them.
Also, you might notice, the result to the parent meters themselves is at random.
Sometimes they both get the same path, sometimes non of them, sometimes the one that was not actually dropped on and sometimes the correct one.
So weird. Did i miss something here or is it a bug?

Note: for easier testing, right click anywhere on the skin to refresh the whole skin.
User avatar
theimmersion
Posts: 55
Joined: November 27th, 2016, 1:51 pm

Re: Drag&Drop[V 3.1.3] - Drag and drop functionallity in Rainmeter, now with even more fancyness!

Post by theimmersion »

Bump Please? Can the plugin author please take a look at the issues im having/found within this plugin? :oops:
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

Re: Drag&Drop[V 3.1.3] - Drag and drop functionallity in Rainmeter, now with even more fancyness!

Post by theAzack9 »

theimmersion wrote:Bump Please? Can the plugin author please take a look at the issues im having/found within this plugin? :oops:
Sorry for not coming back to you earlier...

The current state of the plugin is pretty buggy and i am working on a better version, so i would suggest you waiting until then.
I cannot give any estimation sadly as i have other projects that takes priority currently.

Sorry...
User avatar
theimmersion
Posts: 55
Joined: November 27th, 2016, 1:51 pm

Re: Drag&Drop[V 3.1.3] - Drag and drop functionallity in Rainmeter, now with even more fancyness!

Post by theimmersion »

No problem! I just wanted to know if your aware of the issues and if there are plans to fix it. Because theres no substitude for this plugin, no workaround, no simulating or hacking a drag&drop feature. Only your plugin so far and rainmeter is really lacking that functionality. Well,good luck and hope it will be soon. Not really a patient guy. xD
User avatar
kami
Posts: 39
Joined: July 3rd, 2010, 10:47 am
Location: Canosa di Puglia, Italy

Re: Drag&Drop[V 3.1.3] - Drag and drop functionallity in Rainmeter, now with even more fancyness!

Post by kami »

I'm having issues with one of your example skins: this is one of those you posted to show how the plugin works.

Code: Select all

[DragNDropParent]
Measure=Plugin
Plugin=Drag&Drop

[DragNDropChild1]
Measure=Plugin
Plugin=Drag&Drop
Parent=DragNDropParent
Bounds=0,0,100,200
Action=Path
OnDropAction=[!Log "You dropped a file in the first child!"]

[DragNDropChild2]
Measure=Plugin
Plugin=Drag&Drop
Parent=DragNDropParent
Bounds=DropMeter2
Action=Path
OnDropAction=[!Log "You dropped a file in the secound child!"]

[DropMeter1]
Meter=Image
W=100
H=200
SolidColor=255,255,255

[DropMeter2]
Meter=Image
X=200
W=100
H=200
SolidColor=255,255,255
When i drag an icon on the "first child" i can see two entries in the log: the first one is saying i am dropping the icon on the first child but there is also another entry which says that i'm dropping the icon on the second child.
I think there is something wrong with that because if i drag an icon on one meter linked to a specific measure, all the measures which carry any other plugin action defined in the skin will be called. What i mean is calling an action is equivalent to calling all the actions in the same config file...and it just doesn't make sense to me.
It's practically impossible to create different meters with different drop actions (for example one meter with a delete action and another one with a move action, just next to the first meter).
Am i getting anything wrong? How can i have different meters with different actions?

These are the info about my Rainmeter app
4.2.0 beta r3029 64-bit (Feb 8 2018)
Windows 10 Pro 64-bit (build 16299)
flauros6436
Posts: 2
Joined: December 28th, 2018, 8:13 pm

Re: Drag&Drop[V 3.1.3] - Drag and drop functionallity in Rainmeter, now with even more fancyness!

Post by flauros6436 »

Hello, i realize its been a while but im having trouble and since this is the only way to implement drag&drop there is, id appreciate any help.
i made a recycle bin and i can only drop 1 file at the time with this plugin, ive tried with "ProcessAllFiles=1" but it didnt work, is there any way to fix this?

here is my code

Code: Select all

[Rainmeter]
Update=1000


[BinSize]
Measure=Plugin
Plugin=RecycleManager
RecycleType=Size

[BinItem]
Measure=Plugin
Plugin=RecycleManager
RecycleType=Count

[MeasureBinSize]
Measure=RecycleManager
RecycleType=Size
UpdateDivider=5


[Drag&Drop]
Measure=Plugin
Plugin=Drag&Drop
ProcessAllFiles=1
Action=Delete
Silent=1
OnDroppedAction=[!Update][!Redraw]
DynamicVariables=1



[IMG1]
Meter=Image
ImageName=#ROOTCONFIGPATH#@Resources\Images\bin.png
W=234
H=195
X=75
Y=5
LeftMouseUpAction=!Execute [shell:RecycleBinFolder]
RightMouseUpAction=[!CommandMeasure MeasureBinSize EmptyBin][!Update][!Redraw]


[TEXT]
Meter=String
X=274
Y=52
FontSize=18
FontFace=NewMedia
FontColor=255,255,255,255
StringAlign=Right
StringCase=Upper
StringStyle=Bold
AntiAlias=1
AutoScale=1
Text=Recycle Bin
TransformationMatrix=1;0.10;0;1;0;0


[Item]
Meter=String
MeasureName=BinItem
X=110
Y=25r
FontSize=16
FontFace=Quarca Norm Book
FontColor=255,255,255,255
StringAlign=Left
NumOfDecimals=0
AntiAlias=1
AutoScale=1
Text= %1Items
TransformationMatrix=1;0.10;0;1;0;0

[Size]
Meter=String
MeasureName=BinSize
X=275
Y=r
FontSize=16
FontFace=Quarca Norm Book
FontColor=255,255,255,255
StringAlign=Right
NumOfDecimals=0
AntiAlias=1
AutoScale=1
PostFix=B
TransformationMatrix=1;0.10;0;1;0;0
User avatar
StArL0rd84
Posts: 367
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: Drag&Drop[V 3.1.3] - Drag and drop functionallity in Rainmeter, now with even more fancyness!

Post by StArL0rd84 »

Could this plugin copy something FROM rainmeter?
Example: I want to drag a line of text into notepad.
If not, then it would be a awesome addition to your plugin.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))