AppFuncs Module
BlitzMax Forums/BlitzMax Module Tweaks/AppFuncs Module
| ||
I couldn't think of a better name for it but anyway, this module currently only has three functions: ConsoleWaitKey,SetAppTitle and RenameFile. create the path mod/Pert.mod/AppFuncs.mod create AppFuncs.bmx in mod/Pert.mod/AppFuncs.mod: <See last post for code> Example usage: Import Pert.AppFuncs Graphics 640,480,0 SetAppTitle("This is a test") While Not KeyDown(KEY_ESCAPE) Flip Cls Wend End Import Pert.AppFuncs If not RenameFile("c:\oldfile.txt", "c:\newfile.txt") then print "Cannot rename file!" endif |
| ||
hey pert. =) hum.. got error "Compile Error: Can't find interface for modual 'pert.appfuncs'" I've sync'd to 1.03 - Win32. and run the apptitle demo you put above. I created the folders as described and then made a file and called it appfuncs.bmx in the appfuncs.mod folder and copid the block of text into the file.. saved it and then tryed to run yor appitle demo... got that error. |
| ||
Hmmm, try this instead. You should be able to extract it inside your mod folder and it will create the directory structure for you. If using winzip, just right click on it and choose either Extract To.. or Winzip->Extract To... and direct winzip to the mod folder. (I'm using 1.03 as well). *EDIT* The error you are getting suggests either a typo in the Import command or a typo with the directory structure or filename. It is not case sensitive so no need to worry about that. |
| ||
Hi, the new version might work but I cant get BMAX to stop looking for your module. I get this error... Building ff Compiling:ff.bmx flat assembler version 1.51 3 passes, 1860 bytes. Linking:ff.exe G:\BlitzMaxBeta101\bin\ld.exe: cannot find G:/BlitzMaxBeta101/mod/pub.mod/pert.mod/pert.a Process complete for this code.... Graphics 640,480,0 While Not KeyDown(KEy_Escape) Print "hello" Wend End probly nowt to do with your modual but how do i stop BMAX from looking for a modual that no longer is there??? |
| ||
Presumably rebuilding your modules will remove any reference to it. I don't know what the problem is, but I've had no trouble with the module at all. |
| ||
Doh! I forgot a created a folder in the pub folder.. emoved it and works now. |
| ||
Good :) |
| ||
If you wanted to put it in Pub, you should be able to but you need to change the Import command to reference Pub.Pert.AppFuncs |
| ||
Added ConsoleWaitKey() to wait for any keypress when in console mode (does not work in graphics mode). |
| ||
Added Mac SetAppTitle capability (courtesy of LeisureSuitLurie), untested. appfuncs.bmx: BMaxMacWindows.m: |
| ||
Hey! Its tested. It works on every one of the one Macs I own. :P |
| ||
what I mean is that it's untested inside this module, unless you've tested that as well? |
| ||
Updated appfuncs.bmx - SetAppTitle now works on Linux! (Thanks to some help from skid): |
| ||
Hi, Im new to blitzmax and just tried to install this module. I created the paths as specified and saved the code as AppFuncs.bmx in the correct directory. If I then try and compile ANY code I get this error msg C:/Program Files/BlitzMax/bin/ld.exe: cannot find C:/Program Files/BlitzMax/mod/pert.mod/appfuncs.mod/appfuncs.release.win32.a So I presume I have to compile it but if I do I get a popup error box saying Compile error - module does not match commandline module on this line :- Module Pert.AppFuncs . Ive also pressed Alt-D to rebuild module but that didnt help. Do I have to rebuild all modules or something (dont know how to do that as its greyed out). Help plz ;-) |
| ||
Create a folder called pert.mod (a general folder that I will use for all my mods). inside that folder, create one called appfuncs.mod place the two module sources there (there's a mac .m include a couple of posts up). rebuild the modules I will probably stick this in a zip and upload it a little later if you want to wait. |
| ||
In fact, through the wonders of linux command line (and a bit of luck), here is a zip |
| ||
Downloaded your zip, works a treat now, thanks. But for future reference with installing modules other than placing them in the correct folders whats the rest of the procedure to get them working >? |
| ||
Sometimes you have to go to the bin folder of BMax and then you have to rebuild them by yourself. But to do this you must have MinGW installed and set the MinGW Pathes in Windows. (For further Infos about installing MinGW search the Forum) then you have to call : bmk makemods -r pub.yourmodule for release Version and bmk makemods -d pub.yourmodule for debug Version from commandline. |
| ||
you can rebuild the modules via the IDE without need for commandline stuff. |