Jump to content


Photo

Shortfilename Dll


  • Please log in to reply
8 replies to this topic

#1 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 31 August 2005 - 01:45 PM

A dll that converts a long filename into a short filename.
Long: C:\Documents and Settings\Name\Mine dokumenter\Programmer\Game Maker 5\Games\templates\shortfilename.gmd
Short: C:\DOCUME~1\Name\MINEDO~1\PROGRA~1\GAMEMA~1\Games\TEMPLA~1\SHORTF~1.GMD

Download link: http://home.no.net/t...ortfilename.zip (4 kb)
  • 0

#2 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 31 August 2005 - 03:31 PM

Why do you need a dll for this? I'm sure a simple GML script could achieve the same effect.
  • 0
- Ben

#3 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 31 August 2005 - 04:50 PM

I'm waiting for the script.
  • 0

#4 Porfirio

Porfirio

    GMC Member

  • GMC Member
  • 1209 posts

Posted 31 August 2005 - 07:23 PM

Whats realy the point of it ...


For exemple MCI
MCI_command("OPEN c:\my media\lol.mp3 Type MPEGVIDEO ALIAS OGG")

It will not work, so you can just make this:
MCI_command("OPEN "+chr(34)+"c:\my media\lol.mp3"+chr(34)+" Type MPEGVIDEO ALIAS OGG")

I have looked for a dll like this some time ago but no i dont need it anymore
  • 0

#5 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 31 August 2005 - 08:08 PM

It only adds 5kb (or less) compressed... What's the big deal? I'll use it.
  • 0

#6 Rithiur

Rithiur

    GMC Member

  • GMC Elder
  • 90 posts
  • Version:Unknown

Posted 31 August 2005 - 09:13 PM

I'm sure a simple GML script could achieve the same effect.

String conversion is simple, yes, but getting file's real short path is tricky.

What does this dll really do? I mean, writing a script that converts all the directory names from path longer than 8 characters is no problem at all, but actually returning the real short path for the file is harder (I have no idea how to do that).

What I mean by real short path is this. Let's assume we have following directories in C drive: "really long a" and "really long b" Now, if we wanted the short path for the file "woo.bat" inside the "really long b" directory (so gave "c:\really long b\woo.bat" to the dll) would your dll return "C:\REALLY~1\woo.bat" or "C:\REALLY~2\woo.bat"? You see, both directories have the same first 6 letters, so REALLY~1 and REALLY~2 are completely different directories. It gets even better when there are more than 10 directories having same 6 first letter (which is why I can't make this in GML, 'cause I don't have a clue about how the short directory names are generated.)

It only adds 5kb (or less) compressed... What's the big deal? I'll use it.

Well.. Dll is always an external file, and some may not like that. Alsom unregistered version can't use DLLs.

It will not work, so you can just make this:
MCI_command("OPEN "+chr(34)+"c:\my media\lol.mp3"+chr(34)+" Type MPEGVIDEO ALIAS OGG")

You know, you could always just use single quotes instead of double quotes as the string delimiter like:
MCI_command('OPEN "c:\my media\lol.mp3" Type MPEGVIDEO ALIAS OGG')
  • 0
<a href="http://rithiur.anthd.com" target="_blank">phpInDev</a> - Mostly PHP, but with a flavour of Game Maker

#7 takua108

takua108

    GMC Member

  • GMC Member
  • 582 posts

Posted 31 August 2005 - 09:28 PM

Agreed. That is the major flaw, that ~1 or ~2 thing. I saw that glaring error immediately.
  • 0

#8 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 31 August 2005 - 09:56 PM

I thought about making this dll a while ago but it's pretty pointless.
  • 0

#9 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 01 September 2005 - 12:43 PM

I have been wrongly informed about how mci works, that's why I made it. :(
  • 0