It is currently October 5th, 2024, 3:22 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
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

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

Post by theAzack9 »

Psychopomp wrote:I tried that. It doesn't work.
Terribly sorry, just found another bug... gimmie a sec and i'll fix it

Edit: Download the latest version and it should be fixed ;)

Note: Change Path to FilePath, that was a mistake on my side :)
Psychopomp
Posts: 6
Joined: January 23rd, 2017, 12:18 am

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

Post by Psychopomp »

Thanks on fast solution. Keep up good work.

Final solution.

Code: Select all

[Rainmeter]
Update=1000
Author=http://Lybrica.deviantart.com/
@include=#@#Variables.inc

[Image]
Meter=Button
ButtonImage=pic0_button
X=0
Y=0
LeftMouseUpAction=["E:\Pictures"]

[DragNDrop]
Measure=Plugin
Plugin=Drag&Drop
Action=Copy
FilePath=E:\Pictures
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

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

Post by Mor3bane »

theAzack9 wrote:Hi Mor3bane, you need to specify a path in where the file should be moved ;)

e.g

Code: Select all

[Receive]
Measure=Plugin
Plugin=Drag&Drop
Parent=DragNDrop
Bounds=0,0,131,131
Action=Move
FilePath=#@#Images
If you only want to get the file path itself then you can set the Action= Path, then you won't need a Path to the end directory.

Sorry for late answer :oops:

Edit:
Seems you were right, there were some spookyness in the functions ;)
Download the latest version and apply my suggested changes and it should work fine ;)
So, for dragging - the specified meter needs to be the "holder" of the code?

I would think that is obvious since the file-to-be-dragged could be from anywhere.

What I mean by saying that, is the addition of a Path= does not seem to function - I get a "no action possible" icon on hover (a circle with a diagonal line through it)

Or am I missing the whole thing? Is this drag-and-drop only a Rainmeter specific function? e.g. meter to meter?

I am trying to drag a file from the desktop to my "E:\" drive meter.

Code: Select all

[DragNDrop]
Measure=Plugin
Plugin=Drag&Drop

[Receive]
Measure=Plugin
Plugin=Drag&Drop
Parent=DragNDrop
Bounds=0,0,131,131
Action=Move
FilePath="E:\"
The above code resides in my E drive meter.

The contents of the Redistributable.rar reside in my @Resources\Plugins\ folder.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

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

Post by theAzack9 »

Mor3bane wrote:Text
I'm really sorry for the long wait.

Could you please try the latest update and check if that fixes the issues?

kind regards

theAzack9
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

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

Post by Mor3bane »

theAzack9 wrote:I'm really sorry for the long wait.

Could you please try the latest update and check if that fixes the issues?

kind regards

theAzack9
No worries RL aint kind to time available.

However, using my code shown in my last post still does not allow the drop of the file to the specified directory.
I put the meter on the last line of the code thinking the relative "Z position" of the Meter mattered - no love. :'(
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

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

Post by theAzack9 »

Mor3bane wrote:No worries RL aint kind to time available.

However, using my code shown in my last post still does not allow the drop of the file to the specified directory.
I put the meter on the last line of the code thinking the relative "Z position" of the Meter mattered - no love. :'(
Sorry, i should've tested it first ;)

it seems the issue is that the plugin cannot move things to the root level (e.g C:\ or E:\), but it can if you place it inside a folder on the drive. (e.g E:\Picures)

at least it does for me ;)

i will look into this though since i know what the issue is now

Edit: it might not be possible as windows has some regulation against doing stuff like that (it should work if you set the windows administrator privileges). Easiest solution would be to just put it in a subfolder though ;)

(Warning, just noticed that the plugin will not work if rainmeter is run as administrator due to rainmeter.exe then being a higher priority than the user which stops the possibility to drop items into the window. This is probably dependent on system settings in rainmeter though)
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5537
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

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

Post by eclectic-tech »

@ theAzack9

F.Y.I. :)

The example skin 'Drag&DropExamples\Rainmeter.ini' in version 3.1.0.3 fills the !Log with an error message:
"No path specified for Copy Please specify the location the Drag&Drop plugin should place the dropped file! Use the FilePath option."

The [MeasureTextBox] measure in the example has
Path=#@#

I think it should be
FilePath=#@#

... that eliminates the error messages!

EDIT: Corrected version number above. The documentation states PATH= is the correct syntax, but something changed somewhere :confused:
Last edited by eclectic-tech on March 12th, 2017, 7:07 pm, edited 1 time in total.
User avatar
StArL0rd84
Posts: 426
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 »

Getting a warning in the log:
No path specified! Please specify the destination in the option Path! will be disabled! (SkinName\Recycle\Recycle.ini - [DragNDropParent])

Just using for a recyclebin.
Here is my code:

Code: Select all

[DragNDropParent]
 Measure=Plugin
 Plugin=Drag&Drop
 Action=None

[DragNDropChild1]
 Measure=Plugin
 Plugin=Drag&Drop
 Parent=DragNDropParent
 Bounds=0,0,323,83
 Action=Delete
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5537
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

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

Post by eclectic-tech »

Rather than edit my previous post. I noticed another typo? regarding the OnDropAction...

The original measure is:

Code: Select all

[MeasureTextBox]
 Measure=Plugin
 Plugin=Drag&Drop
;The Directory the file will be placed in
 Path=#@#
;Which action you want, currently there are five: Shortcut, Path, Copy, Delete and Move Default=Copy
 Action=Delete
 OnDroppedAction=[!Log "$FileDirectory$\$FileName$$FileType$ sent to the Recycle Bin."]
 OnDropActionSubstitute=\:\\
 DynamicVariables=1
The measure that eliminates errors and posts to the log correctly is:

Code: Select all

[MeasureTextBox]
 Measure=Plugin
 Plugin=Drag&Drop
;The Directory the file will be placed in
 FilePath=#@#
;Which action you want, currently there are five: Shortcut, Path, Copy, Delete and Move Default=Copy
 Action=Delete
 OnDropAction=[!Log "$File$ sent to the Recycle Bin."]
 OnDropActionSubstitute=\:\\
 DynamicVariables=1
When you fix one thing it sometimes breaks something else :lol:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5537
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

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

Post by eclectic-tech »

ProcessAllFiles=1 added to the Parent measure seems to still only process the first file dropped. A !Refresh will not reset to allow further drops, only unloading/loading allows it to delete only the first file dropped again.

Did I miss something?

Here 's my code for a RecycleBin skin. I tried with 1 measure doing all the drop process, and with Parent/Child... :???:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
Group=#RootConfig#

[Metadata]
Name=Drag&DropExample_RecycleBin
Author=Eclectic Tech (Drag&Drop plugin by theAzack9)
Version=1.2017.03.12
Information=Simple example of how the drag&drop plugin works
License=Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported

;;====================================================
;;  Measures
;;====================================================
 
[MeasureDnD]
Measure=Plugin
Plugin=Drag&Drop
ProcessAllFiles=1
DynamicVariables=1

[MeasureDelete]
Measure=Plugin
Plugin=Drag&Drop
Parent=[MeasureDnD]
;The Directory the file will be placed in (not needed for 'Delete')
; FilePath=#@#
;Which action you want, currently there are five: Shortcut, Path, Copy, Delete and Move
Action=Delete
Bounds=Meter1
OnDropAction=[!Log "$File$ sent to the Recycle Bin."]
OnDropActionSubstitute=\:\\
DynamicVariables=1

[MeasureRecycle]
Measure=Plugin
Plugin=RecycleManager
RecycleType=Count
; Type of information to measure. Valid values are:
; Count: Number of files in the recycle bin (default).
; Size: Total size of the recycle bin in bytes.
IfCondition=(#CurrentSection#>0)
IfTrueAction=[!SetOption Meter1 ImageName "#@#Images\Full]
IfFalseAction=[!SetOption Meter1 ImageName "#@#Images\Empty]

;;====================================================
;;  Meters
;;====================================================
[Meter1]
Meter=Image
ImageName=#@#Images\Empty
X=1
Y=1
W=48
H=48
LeftMouseUpAction=[!CommandMeasure MeasureRecycle "OpenBin"]
MiddleMouseUpAction=[!CommandMeasure MeasureRecycle "EmptyBin"]
DynamicVariables=1
Thanks for any thoughts!

P.S. I see in an earlier post, you changed PATH= to FILEPATH=, but the example still had the old syntax. Maybe those were from somewhere else!?

RMSkin:
RecycleBinDragNDrop_1.2017.03.12.rmskin
You do not have the required permissions to view the files attached to this post.