Jump to content


Photo

Filetype Adder Gex


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

#1 JordanMaster22

JordanMaster22

    GMC Member

  • New Member
  • 496 posts

Posted 21 March 2007 - 11:54 PM

<span style='font-size:21pt;line-height:100%'>The Filetype Adder GEX</span>
By Sharpened Entertainment

NOTE: This GEX has only one function on it but is a very useful function for games/programs that want to be opened by a .avi, .mpg, .other file.

add_filetype(filesuffix,name,icon,proram)

This GEX will be USELESS if it can't find out what file was used to open it! Look at this code to help you:

--------------------------------------------------
for (i=1; i<=parameter_count(); i+=1) //get what file just opened the program
{
show_message("You opened me with "+parameter_string(1))) //tell the user that file
game_end()
}
if parameter_count()=0
{
show_message("You didn't open me with a file") //tell the user a file hasn't been used to open the program
game_end()
}

--------------------------------------------------


----------
Games/Programs That Used This:
<none so far>
--
To submit a game, just leave a reply.
----------

You may not sell this GEX file, but you may sell a game/program made with this.

Type: GEX and GMK
Size: 16.00KB
Posted Image


EDIT: I have decided to release the gml code for how to do this:
#define add_filetype
registry_set_root(2);
registry_write_string_ext(argument0,"", argument1);
registry_write_string_ext(argument1,"", argument1);
registry_write_string_ext(argument1+"\DefaultIcon\","",working_directory+"\"+argument2+", 0");
registry_write_string_ext(argument1+"\shell\open\command\","", argument3+' "%1"'+' "'+''+'"');

Edited by KC LC, 09 January 2010 - 11:24 AM.

  • 0
Oh no! Is Hypercam and Camstudio too laggy and crappy to record your games? All you want is to get some HQ or HD footage of your Game Maker game, but you don't have a state of the ark computer. There's a solution! This engine records hours of HQ or HD footage of your game, saves it to a KB-sized file, and doesn't require a lot of memory! Also, you can customize the frame-rate while playing back a file, so Hypercam can record a low frame rate and output a high one!

HD PLAYBACK ENGINE

#2 molloyboy08

molloyboy08

    pyr0t3chnic

  • New Member
  • 473 posts

Posted 22 March 2007 - 12:43 AM

I would add to not use it for any extension that you (the programmer) didnt make, unless you've had experience with it and the user of the program wants you to, if the user doesnt or you make a mistake, some people could get very angry at you. I know alot of people that download games and other programs, and if the association was changed without them wanting it, they would have no idea how to change it back
  • 0
Returning after a break from gamemaker.
Gamemaker experience: 6,7 both paid. 8 soon to be pro
Programming knowledge: (May be missing a few currently)
C, C#, C++, java, HTML, CSS, Javascript, PHP, ASP.NET, SQL, Visual Basic, Perl, assembly, batch

Temporary sig while I figure out if I have anything worthwhile to put.

#3 JordanMaster22

JordanMaster22

    GMC Member

  • New Member
  • 496 posts

Posted 22 March 2007 - 12:48 AM

I would add to not use it for any extension that you (the programmer) didnt make, unless you've had experience with it and the user of the program wants you to, if the user doesnt or you make a mistake, some people could get very angry at you. I know alot of people that download games and other programs, and if the association was changed without them wanting it, they would have no idea how to change it back

<{POST_SNAPBACK}>


im no n00b. i dont take other people's idea's and rip them apart and paste my things to it. all this really does is go to a system folder and write some registry keys.
  • 0
Oh no! Is Hypercam and Camstudio too laggy and crappy to record your games? All you want is to get some HQ or HD footage of your Game Maker game, but you don't have a state of the ark computer. There's a solution! This engine records hours of HQ or HD footage of your game, saves it to a KB-sized file, and doesn't require a lot of memory! Also, you can customize the frame-rate while playing back a file, so Hypercam can record a low frame rate and output a high one!

HD PLAYBACK ENGINE

#4 Thull

Thull

    ACP Webdesigner

  • New Member
  • 340 posts

Posted 22 March 2007 - 12:54 AM

Do you really need an extension for this? I could do this in a few lines of code...not that hard, not worth the download.
  • 1

#5 molloyboy08

molloyboy08

    pyr0t3chnic

  • New Member
  • 473 posts

Posted 22 March 2007 - 01:51 AM

u wouldnt need an extension if you know how to.

im no n00b. i dont take other people's idea's and rip them apart and paste my things to it. all this really does is go to a system folder and write some registry keys.

when did i call you a noob, and i know what it does, i didnt say you take other peoples ideas and rip them apart, i was adding for whoever goes to use it. lets say they use it to make a .txt file associated with their program, so instead of notepad or word etc its opened with the prog, now what if the user never encountered this before when they download this program. They would go crazy.
  • 0
Returning after a break from gamemaker.
Gamemaker experience: 6,7 both paid. 8 soon to be pro
Programming knowledge: (May be missing a few currently)
C, C#, C++, java, HTML, CSS, Javascript, PHP, ASP.NET, SQL, Visual Basic, Perl, assembly, batch

Temporary sig while I figure out if I have anything worthwhile to put.

#6 T-Bird

T-Bird

    GMC Member

  • New Member
  • 1326 posts

Posted 22 March 2007 - 04:51 AM

I'm confused. Does this purely associate the specific filetype with your program or does it also include the necessities to make your program act when the file is oppened. The later is what I would like to see. Its one thing to just launch your software when they click on a certain extensioned file, its another to have it load the info from that file.
  • 0

#7 JordanMaster22

JordanMaster22

    GMC Member

  • New Member
  • 496 posts

Posted 22 March 2007 - 09:02 PM

I'm confused.  Does this purely associate the specific filetype with your program or does it also include the necessities to make your program act when the file is oppened.  The later is what I would like to see.  Its one thing to just launch your software when they click on a certain extensioned file, its another to have it load the info from that file.

<{POST_SNAPBACK}>


ya know how when you install a program that can generate .whatever files? this gex allows you to make a code so that when you launch your game, the file accosiation with .whatever will automatically always open with this program. eg: in the example i made, it generates all files with the extension .jchalase, and puts an icon, name, and the program it should open with.
  • 0
Oh no! Is Hypercam and Camstudio too laggy and crappy to record your games? All you want is to get some HQ or HD footage of your Game Maker game, but you don't have a state of the ark computer. There's a solution! This engine records hours of HQ or HD footage of your game, saves it to a KB-sized file, and doesn't require a lot of memory! Also, you can customize the frame-rate while playing back a file, so Hypercam can record a low frame rate and output a high one!

HD PLAYBACK ENGINE

#8 T-Bird

T-Bird

    GMC Member

  • New Member
  • 1326 posts

Posted 24 March 2007 - 04:32 AM

I realise that part. Thats just some registry stuff. I was wondering whether or not you included any code for making Game Maker recognize that its been opened by a .whatever file and get that file name so that it can act accordingly.
  • 0

#9 antidote

antidote

    GMC Member

  • New Member
  • 117 posts

Posted 24 March 2007 - 04:53 AM

To be blunt, I'm not downloading anything from here that edits registry entries without my knowledge of what it is.
  • 0

#10 Alex

Alex

    3lite Member

  • New Member
  • 3098 posts

Posted 24 March 2007 - 05:20 AM

To be blunt, I'm not downloading anything from here that edits registry entries without my knowledge of what it is.


I agree, please show the source of how the extension updates this information.
  • 0

#11 JordanMaster22

JordanMaster22

    GMC Member

  • New Member
  • 496 posts

Posted 24 March 2007 - 05:58 PM

there. heres the code. happy? =P
  • 0
Oh no! Is Hypercam and Camstudio too laggy and crappy to record your games? All you want is to get some HQ or HD footage of your Game Maker game, but you don't have a state of the ark computer. There's a solution! This engine records hours of HQ or HD footage of your game, saves it to a KB-sized file, and doesn't require a lot of memory! Also, you can customize the frame-rate while playing back a file, so Hypercam can record a low frame rate and output a high one!

HD PLAYBACK ENGINE

#12 softhunterdevil

softhunterdevil

    LazyBoy

  • GMC Member
  • 276 posts

Posted 25 March 2007 - 05:32 PM

Rename the command as something simila to ...

file_add_registry
or
file_register
something that starts with name file ...

because as Mark uses ... sound_ for functions delaing with sounds, file_ for functions dealing with files ... I think then the command will be more easy to remember.
  • 0
<a href="http://www.redbubble...eactdevelopers" target="_blank"><img src="http://www.redbubble...rb_profile.gif" border="0" class="linked-sig-image" /></a><a href="http://www.redbubble...eactdevelopers" target="_blank"><img src="http://www.redbubble...ers_banner.jpg" border="0" class="linked-sig-image" /></a>

#13 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 27 March 2007 - 09:07 PM

antidote, /\lex, molloyboy08.... pff paranoid people. Its no big deal if it screws something up, Windows can be fixed in 15 minutes max.

This looks interesting. I actually will need it sometimes in the future.
  • 0

#14 TheOmega

TheOmega

    GMC Member

  • New Member
  • 88 posts

Posted 30 March 2007 - 09:08 PM

I did that before, the filetpying thing, I ran into a problem where GM's working_directory will be set to the spot where you opened the file. Does that happen with your package?
  • 0
Loves his girlfriend Melissa <3

#15 JordanMaster22

JordanMaster22

    GMC Member

  • New Member
  • 496 posts

Posted 31 March 2007 - 04:47 PM

I did that before, the filetpying thing, I ran into a problem where GM's working_directory will be set to the spot where you opened the file.  Does that happen with your package?

<{POST_SNAPBACK}>


not if you type the EXACT directory of the file
ex: C:\blablabla\blablabla.exe
  • 0
Oh no! Is Hypercam and Camstudio too laggy and crappy to record your games? All you want is to get some HQ or HD footage of your Game Maker game, but you don't have a state of the ark computer. There's a solution! This engine records hours of HQ or HD footage of your game, saves it to a KB-sized file, and doesn't require a lot of memory! Also, you can customize the frame-rate while playing back a file, so Hypercam can record a low frame rate and output a high one!

HD PLAYBACK ENGINE

#16 Chaos In a Can

Chaos In a Can

    GMC Member

  • New Member
  • 70 posts

Posted 31 March 2007 - 08:54 PM

I did that before, the filetpying thing, I ran into a problem where GM's working_directory will be set to the spot where you opened the file.  Does that happen with your package?

<{POST_SNAPBACK}>

As far as I've found, this happens no matter what you do. You can use program_directory instead, but it won't work so well when you test it from GM.

Really, the only way to solve this completely is to create your own variable, then set it to working_directory if the program was not opened from a file, or set it to program_directory if it was.
  • 0

#17 molloyboy08

molloyboy08

    pyr0t3chnic

  • New Member
  • 473 posts

Posted 01 April 2007 - 10:05 PM

With this association file, you have the filetype as sharpend....etc in the registry, does that mean that if you have more than 1 ext and they are associated with different programs, only one will work, or does your extension compensate for that?

After this i will completely ignore this topic because it is a waste of my time and effort to try to be helpful, ie. by giving a use-do-and-don't suggestion because not everyone is skilled at a computer; some just know howto turn it on check email or run a program and would go crazy if something was different, just to get called called paranoid, for looking out the the averge joe user, or being accused of accusing someone of taking someone elses code. Besides i already can do this so yea thats y its a waste of my time.
  • 0
Returning after a break from gamemaker.
Gamemaker experience: 6,7 both paid. 8 soon to be pro
Programming knowledge: (May be missing a few currently)
C, C#, C++, java, HTML, CSS, Javascript, PHP, ASP.NET, SQL, Visual Basic, Perl, assembly, batch

Temporary sig while I figure out if I have anything worthwhile to put.

#18 JordanMaster22

JordanMaster22

    GMC Member

  • New Member
  • 496 posts

Posted 02 April 2007 - 01:55 AM

With this association file, you have the filetype as sharpend....etc in the registry, does that mean that if you have more than 1 ext and they are associated with different programs, only one will work, or does your extension compensate for that?

After this i will completely ignore this topic because it is a waste of my time and effort to try to be helpful, ie. by giving a use-do-and-don't suggestion because not everyone is skilled at a computer; some just know howto turn it on check email or run a program and would go crazy if something was different, just to get called called paranoid, for looking out the the averge joe user, or being accused of accusing someone of taking someone elses code. Besides i already can do this so yea thats y its a waste of my time.

<{POST_SNAPBACK}>


i understand what you're going thru

ie. when i made that topic on music requests
  • 0
Oh no! Is Hypercam and Camstudio too laggy and crappy to record your games? All you want is to get some HQ or HD footage of your Game Maker game, but you don't have a state of the ark computer. There's a solution! This engine records hours of HQ or HD footage of your game, saves it to a KB-sized file, and doesn't require a lot of memory! Also, you can customize the frame-rate while playing back a file, so Hypercam can record a low frame rate and output a high one!

HD PLAYBACK ENGINE

#19 oakwhiz

oakwhiz

    GMC Member

  • New Member
  • 268 posts

Posted 03 April 2007 - 03:16 AM

I'm not going to use this because Install Creator Pro takes care of this easily and with more flexibility.
  • 0

#20 JordanMaster22

JordanMaster22

    GMC Member

  • New Member
  • 496 posts

Posted 03 April 2007 - 12:46 PM

I'm not going to use this because Install Creator Pro takes care of this easily and with more flexibility.

<{POST_SNAPBACK}>


im not even sure if install creator pro does anything with this...
  • 0
Oh no! Is Hypercam and Camstudio too laggy and crappy to record your games? All you want is to get some HQ or HD footage of your Game Maker game, but you don't have a state of the ark computer. There's a solution! This engine records hours of HQ or HD footage of your game, saves it to a KB-sized file, and doesn't require a lot of memory! Also, you can customize the frame-rate while playing back a file, so Hypercam can record a low frame rate and output a high one!

HD PLAYBACK ENGINE

#21 Speewave123

Speewave123

    GMC Member

  • New Member
  • 67 posts

Posted 05 May 2007 - 05:16 AM

This is for no noob. but Inno Setup, Freeware setup app using ISTool can easily do this.
  • 0

#22 molloyboy08

molloyboy08

    pyr0t3chnic

  • New Member
  • 473 posts

Posted 09 May 2007 - 04:45 AM

havent used those programs but if they require the user of the program to do something, which including an install like file then this would be better because its in game and many people dont like having to do something. If not then whatever.

ps- my sig has a link to my scripts that do the same thing and more and allow easy changing during execution. unfortunely no deleting. If your still monitering this jchalase feel free to use my scripts in your gex to expand it, just dont claim as yours.
  • 0
Returning after a break from gamemaker.
Gamemaker experience: 6,7 both paid. 8 soon to be pro
Programming knowledge: (May be missing a few currently)
C, C#, C++, java, HTML, CSS, Javascript, PHP, ASP.NET, SQL, Visual Basic, Perl, assembly, batch

Temporary sig while I figure out if I have anything worthwhile to put.

#23 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • GMC Elder
  • 9603 posts
  • Version:GM:Studio

Posted 09 July 2008 - 08:56 PM

I realise that part. Thats just some registry stuff. I was wondering whether or not you included any code for making Game Maker recognize that its been opened by a .whatever file and get that file name so that it can act accordingly.

Simply use parameter_string(1). That will return the filename of the file you opened the game by.

I.E. if I associate .blah files with my program, and open up myFireFile.blah, then parameter_string(1) will have in it myFireFile.blah.

Do what you want with it.

-IMP :( :whistle:
  • 0

:GM123: Are you an artist who likes creating original creature designs? Maybe you can help out with Elementa here! Give it a look; you might like the idea :)

:bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny:


#24 DarkFlame

DarkFlame

    GMB Member...wtf?

  • GMC Member
  • 2167 posts

Posted 01 August 2008 - 06:30 AM

cant download,....do need this,....however i will just use the script =/

Edited by DarkFlame, 01 August 2008 - 06:44 AM.

  • 0

#25 molloyboy08

molloyboy08

    pyr0t3chnic

  • New Member
  • 473 posts

Posted 02 August 2008 - 04:48 AM

This is an old topic so of course the download probably doesn't work.

If you want to do this use my file extension/association scripts (see sig) the download works, it has more options, and I think the scripts are easy to use although without feedback I don't know for sure. Best of all if you have any questions just send me a message and I'm positive I can help and/or write what you need to do.

Edit: decided to give the topic url
http://forums.gamema...howtopic=289157

Edited by molloyboy08, 02 August 2008 - 04:49 AM.

  • 0
Returning after a break from gamemaker.
Gamemaker experience: 6,7 both paid. 8 soon to be pro
Programming knowledge: (May be missing a few currently)
C, C#, C++, java, HTML, CSS, Javascript, PHP, ASP.NET, SQL, Visual Basic, Perl, assembly, batch

Temporary sig while I figure out if I have anything worthwhile to put.

#26 DarkFlame

DarkFlame

    GMB Member...wtf?

  • GMC Member
  • 2167 posts

Posted 02 August 2008 - 04:51 AM

Uhm thanks,...ill keep it all in mind for when i get to that point
  • 0