Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dropping a file on an .exe
#1
I'm trying make some code to open a mp3 file by dropping it over an .exe but I cant figure out how to make my program understand from where the file I'm draging is coming from. Can someone help me with this one?
[Image: rg_link.png]
I'm a dog and I feel dirty baby
Reply
#2
COMMAND$ :)
Reply
#3
Is there any examples how to use command$?
[Image: rg_link.png]
I'm a dog and I feel dirty baby
Reply
#4
Ask Rattrapmax6 :^_^:
Itch-Five Design - Your source for free, well designed, web design.
- - - - - - - - - - - - -
Quote:I use QB religiously. Too bad I'm an athiest.
Reply
#5
yeah its dead easy.

try this sample program

Code:
print command$
sleep 5000

compile it then drop a file onto it. viola.
Reply
#6
Oh, damn! Thanks KiZ. That was quite easy indeed :bounce: . I feel like fool sometimes :lol: Now it'll be easy to do what I want to do.

EDIT: files without spaces in the filename works perfect while thoose with spaces do not. This leaves me a bit confused.
[Image: rg_link.png]
I'm a dog and I feel dirty baby
Reply
#7
If the filename has spaces, it will be surrounded in "double quotes".
Reply
#8
Thats a bit annoying but not very hard to get around. I might sound like a total retard now but, eh... why does it contain double quotes when spaces is involved?
[Image: rg_link.png]
I'm a dog and I feel dirty baby
Reply
#9
Check what happens when you drop multiple files: COMMAND$ will contain something like "C:\Path With Spaces\a.txt" "C:\Path With Spaces\b.txt". Without the quotes, this would be ambiguous.
Reply
#10
Ah. I see. :oops:
[Image: rg_link.png]
I'm a dog and I feel dirty baby
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)