Jump to content


Photo

Dragger Dll


  • This topic is locked This topic is locked
59 replies to this topic

#1 tangibleLime

tangibleLime

    Lunatic

  • Global Moderators
  • 2520 posts
  • Version:GM:HTML5

Posted 20 January 2007 - 06:59 PM

<span style='font-size:12pt;line-height:100%'>Dragger DLL</span>

With this DLL, you can allow users to drag files to the Game Maker window, and have it recognize the files being dropped. You can also figure out how many files are being dropped, and a certain item using the index (0 based). The example (gm6) shows how to use the functions. Look in the scripts to find the arguments and returns.

If you have any problems, please tell me here.

Download: DraggerDLL.zip (~8 KB)

Rock on,
Roach
  • 0

#2 HomerTheDragoon

HomerTheDragoon

    GMC Member

  • GMC Member
  • 823 posts

Posted 20 January 2007 - 07:36 PM

wow sounds fantastic, let me try this.
  • 0

#3 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 20 January 2007 - 07:46 PM

Well, works like a charm and a really nice example.
However, there are already DLL's out here that can do that, and even more (eg. filesize, attributes, etc.).
  • 0

#4 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 21 January 2007 - 12:00 AM

it would be good if it recognised what file type it was, eg. PDF file or Word Document
  • 0

#5 coolsmile

coolsmile

    Programmer

  • New Member
  • 1346 posts

Posted 21 January 2007 - 12:23 AM

What do you mean? I can drop that type of file...
You probably mean gm could read it?

--Oh well... :P
  • 0

#6 Quimp

Quimp

    Pretzel fanatic

  • New Member
  • 275 posts

Posted 21 January 2007 - 12:39 AM

Very useful functionnality (for me at least), thank you Roach.
  • 0

#7 P-entertainment

P-entertainment

    GMC Member

  • GMC Member
  • 1429 posts

Posted 21 January 2007 - 12:51 AM

This may be just what I'm looking for :P
  • 0

#8 crash2108

crash2108

    GMC Member

  • New Member
  • 148 posts

Posted 21 January 2007 - 02:01 AM

It doesn't work for me.
  • 0

#9 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 21 January 2007 - 04:17 PM

no, I mean that when you drop a file into the window, it tells you what type of file you dropped.
  • 0

#10 celebraces

celebraces

    GMC Member

  • GMC Member
  • 956 posts

Posted 21 January 2007 - 04:29 PM

I think it's worth noting that you can set the first argument drag_mode to a handle returned by GMWWW's functions; you can set a specific area of a window to receive files.
  • 0

#11 tangibleLime

tangibleLime

    Lunatic

  • Global Moderators
  • 2520 posts
  • Version:GM:HTML5

Posted 21 January 2007 - 06:05 PM

no, I mean that when you drop a file into the window, it tells you what type of file you dropped.

<{POST_SNAPBACK}>

Your wish is my command. I'll include it in the next version.
  • 0

#12 Melari

Melari

    GMC Member

  • New Member
  • 104 posts

Posted 21 January 2007 - 07:00 PM

This is really neat!
  • 0

#13 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 22 January 2007 - 12:21 AM

This is really usefull. Thanks.
  • 0

#14 Smarttart62

Smarttart62

    designFUSION™

  • New Member
  • 2619 posts

Posted 22 January 2007 - 12:26 AM

Finally another one... The last one i saw was more of a hack job...
-Steve
  • 0

#15 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 22 January 2007 - 03:12 AM

Slight bug:
drag_num, drag_get, and drag_step
are supposed to return values, but you do not tell the scripts to return; they just call their function. Curious that they still work...

Edited by IsmAvatar, 22 January 2007 - 03:14 AM.

  • 0

#16 tangibleLime

tangibleLime

    Lunatic

  • Global Moderators
  • 2520 posts
  • Version:GM:HTML5

Posted 22 January 2007 - 04:51 AM

I've always done that. It just always works, for some reason.
  • 0

#17 Quimp

Quimp

    Pretzel fanatic

  • New Member
  • 275 posts

Posted 22 January 2007 - 12:44 PM

Game Maker has to return a value (the result can't be void), so it returns the last result it has gathered. Ex: script0: vara = "32"; Creation room event: show_message(script0());
  • 0

#18 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • Retired Staff
  • 9260 posts
  • Version:Unknown

Posted 22 January 2007 - 10:06 PM

I like this, but I've found a bug. When calling drag_get(files_get,"0") the drive letter is missing (it starts at the colon). I can assume it's drive C, but on others' computers it may not be... can this be fixed?

BTW, it works okay with every other index, it only misses the drive letter on index 0....

-IMP :D :)
  • 0

#19 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 22 January 2007 - 10:10 PM

about my suggestion roach, you could use GM's function "filename_ext"
  • 0

#20 zephroelectro

zephroelectro

    GMC Member

  • New Member
  • 265 posts

Posted 24 January 2007 - 01:46 PM

woot. altho h0bbels stuff already does this, and offers alot more function.

still good tho :)
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users