New PB Library : System

Windows specific forum
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Mr.Skunk.

A small and old library (forgot it on my HD...)

4 commands :

ComputerName() to get the computer name.
SystemDirectory() to get the system directory.
UserName() to get the... user name logged. "" if logged as Default.
WindowsDirectory() I let you find the use of this command


Mr Skunk

Mr Skunk's PureBasic Web Page
http://www.skunknet.fr.st
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by stephenwhite.

Mr Skunk

Just wanted to thank you for the excellent work you are doing - it is greatly asppreciated. Now can we have... blah... blah... blah.

Great stuff mate.

Stephen White
CraftMedia
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Mr.Skunk.

Feel free to ask if you need a special library first.
I don't know if i'll be able to do it, but i'll try...


Edited by - mr.skunk on 17 July 2001 04:31:46
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by stephenwhite.

Two I can think of at the moment Mr Skunk: System Tray support and Filetype checking - both might be difficult to implement (understatement of the year?).

Tray Support
Ability to minimize an app to the tray and access it via a popup menu.

App Checking
Ability to check for the location of an application by checking to see if an entry exists in the FileTypes. For example:

result=findApp(".html")
put result <-(old Director Lingo language - sorry)
-- "C:\Program Files\Internet Explorer\iexplore.exe"

No pressure - you've already done an excellent job and I thank you for that. All the best and keep up the great work.

A great way of finding useful commands is to check out some of the Macromedia Director Xtras - I can send you some useful documentation if you would like - might give you some ideas.

Cheers again

Stephen White
CraftMedia
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Mr.Skunk.

For the Systray and Popmenu, fred works on it, it will be in PB 2.40

I'll look at the FindApp comand.

I'am always interested by new documentations if you can send them.

Thanks.


Edited by - mr.skunk on 17 July 2001 15:02:18
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by wavemaker.

Hi, Mr. Skunk:

I'm quite familiar to C and ASM, but not to Nasm, nor LccWin, nor the Win32 Api. For that reason, I've not been capable of writing a single library for PB, and I 'd like to. Would it be possible to have access to the source of the libraries you coded? It would help a lot. If not, I'd like to know if .O files produced by gcc (the C compiler of the DJGPP package, which is more useable for me than Lcc) are valid .OBJ files for the LibraryMaker.

By the way, the LibraryMaker gives a "Debugger routine not found" or something of the kind when I try to make a library from test.asm (which comes with PB Windows).

Thanks a lot for your work,

Juan Calderón Alonso
Registered user
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Mr.Skunk.

For the "Debugger routine not found" message, it's normal.
You can compile a debug library for a library you wrote, and merge it with the "Library Maker" (to use with the PB debugger), but it's not obliged (i'm one the way learning the debug libraries and a tutorial will follow).

You can compile your library with the "Debugger routine not found" messages without problem...

I've mailed you some sources.

If Someone else is interested tell me, i will put the sources directly to my web page...

Mr Skunk

Mr Skunk's PureBasic Web Page
http://www.skunknet.fr.st
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Mr.Skunk.

I've found an API call fot FindApp, but you have to specify the entiere path+name file:
example : FindApp("c:\Images\logo.bmp")
will return for example
"c:\progra~1\pbrush.exe"

Is that function could be alright, even if you have to specify a filename instead of ".bmp" ???

If not, i'll continue searching...

Mr Skunk

Mr Skunk's PureBasic Web Page
http://www.skunknet.fr.st
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by stephenwhite.

Hi mate

There are a couple of Xtras for Director called FileXtra and ZOpen. I think what they do is check the extension in the filetypes to see what app is associated with it. So, you would normally send the command set print FindApp(".bmp") and it might return "C:\Windows\Paint.exe."

I think the Xtras actually check the registry but I'll have a closer look. All the best.

Stephen White
CraftMedia
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by stephenwhite.

Well I went trudging through the Registry and although the file extensions are entered several times, none of the settings show the actual path of the default application - or maybe they do but I can't decipher it.

I'll look into this a little more closely.

Stephen White
CraftMedia
Post Reply