Keyboard Input

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 Paul.

Has anyone had problems using the
InitKeyboard() command??

On my NT box I get an error:
Can't create 'PureBasic.exe' file (already running ?)

and on my Win98 box with DirectX installed I get an Application Error!
Any Ideas??

On another note... Mr.Skunk
Do you know of an API call to check for a keypress or an API call to see if the Left Mouse Button has been pressed (regardless of what window is in focus)?
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 Paul.

Actually, I figured out I can use the GetKeyState API command to see if a specific key has been pressed but I'm still stuck on how to see a mouse click.
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 InitKeyboard(), it's very strange. As it works very well in the demo keyboard program, but not in all the test i've made...
Solution : You MUST use the InitSprite() in order have the InitKeyboard() command working (strange )
You can't read mousebuttons for the moment. These windows events are not returned by WindowEvent() and WaitWindowEvent() in the current release of PB. Fred has modified the Window Library, so they WILL be supported in the next release.

Mr Skunk
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 Paul.

InitSprite()..???
Hmmmm, that is strange.

Thanks for the note on the Mouse input.
Just curious, how long have you been using PB ?? You also seem to be pretty handy with the Windows API :)
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 been using PB for 3 or 4 weeks, but i used BlitzBasic before with my miga (the syntax is almost the same, and Fred has done lots of library for BlitzBasic too)...
For the API, i first used them 2 month ago, i think.
I was looking for a new basic (at least i found PB) and i tried LibertyBasic (but LB is 16Bits and has runtime prog). It's the first time i used APIs.
APIs are not very difficult (some of them are), you can find lot of docs on the web about them.

And about you?

Edited by - mr.skunk on 30 June 2001 04:28:22
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 Paul.

I've been using OBasic (a Basic scripting language) the last 2 years which is great for database type apps but the bigger your program gets, the slower it starts to run. I had a need for some graphic apps so I moved to BlitzBasic for PC which is really fast because it compiles the code.
I wanted to find a replacement for OBasic which also compiled code and was fast. PureBasic is definately fast but still lacks quite a bit in commands. I really hope that someday it will be as robust as OBasic command wise.

Do you know if PB is able to call DLL's?
I know there is no specific command but can you do it through some kind of API call?
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 Paul.

... I guess my biggest problem is trying to decipher the Windows API. It isn't always clear on what commands have to be used before you can actually use the command you need.
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 Shagwana.

You lot might wana check out Blitz Basic on the PC . http://www.blitzbasic.com http://www.blitzbasement.com . As it stands at the moment its only for 2d games, but they have future versions comming out dubbed '3d' and 'pro'. Its made by the same team that did Blitz on the Amiga.

http://www.sublimegames.com
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.

About PB able to call DLLs, you want to say external DLLs (which are not already included in Pb calls)?
PB can't directely i think, you have to pass through a PB Library, it might be possible to do a special PB Library to open, call and close these Dlls...

For the windows BlitzBasic, i've a friend which has bought it. But it's really only for games (no system gadgets acces, no window just screens, no possibility to enhance it myself, no windows API acces...).
I only do utils, so Blitz for Windows is definitively not for me...
And the exec are very big compare to PB, same problem in the old miga version (30Ko just to open a window EEEEEEEEeeeeekkkk)

Mr Skunk
Post Reply