Object_OnDropFiles(f) problem

Hi, everybody!

Please look at my code a little:

Code: vbscript
  1. Dim DroppedImage
  2. Sub Object_OnDropFiles(f)
  3.  f1 = Split(f,"|")
  4.  DroppedImage="Image: "&Chr(34)&f1(0)&Chr(34)&"has been dropped into this object."
  5. End Sub

The problem is the variable "DroppedImage". I checked its value, it is:

Image: "C:\a.jpg

That's everything, I do not know where the rest part is. Someone help me, please. Thanks! 

I am using DesktopX 3.1 on Windows XP SP3 32 bit.

41,558 views 8 replies
Reply #1 Top

I haven't the foggiest. But I sent sViz a PM for you. She can sort anything out. She's real good at this stuff! 

Reply #2 Top

I used your script as is, and it worked fine. Where are you showing the DroppedImage message? Are you using a message box, or...?

+1 Loading…
Reply #3 Top

Hi Eve....knew I'd see you here...:smitten:

 

The lengths a guy has to go to just to see his .  

Reply #4 Top

lol...Howdy Jim <3 Still keeping up the good work with DX, I see.

+1 Loading…
Reply #5 Top

Oh, thank you, RedneckDude and sViz!

You say my code works fine? I have problem with DroppedImage variable, just look at the screenshot http://imageshack.us/photo/my-images/844/unleddvi.png/. That variable does not show the whole string as expected, it shows a part of the expected string only. I do not know why? Please help me. I hope you understand what I say. Thanks, waiting for your reply...

Reply #6 Top

Strange, the code is fine. I'm on Vista and DX 3.5. You may need a later version, but I shouldn't think that would affect it. Seems everything after the second Chr(34) is cut off; can't say I know what the problem is.  A long time ago, iirc, someone once said to use spaces between the "&"s , instead of everything running together. Wish I remember where I read that. Have you tried it without the quotation characters? Also, do you need the message; does it apply the picture to the object without any problems? Oftentimes, when I run into oddities like this, I'll simply remove them from the equation.

Reply #7 Top

I think this is a bug on DesktopX 3.1. About my situation: I want to get the path of the image dropped onto current object as a parameter in a string to be processed later. And the value of that string will be the beginning of that string and the image path only, the rest part of that string will be cut off, regardless what it is, that is the problem. My code was just an illustration for that bug, no more. Now, I move to DesktopX 3.5, my code works without that bug any more. Love DesktopX forever!<3

Thanks a lot for your help, sViz. Good time!|-)

+1 Loading…
Reply #8 Top

Glad everything's working for you. :thumbsup:  Happy DXing