Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Scancode To ASCII Plugin

Author
Message
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 7th Jun 2003 02:12
This plugin converts the given scancode (as given by the scancode() command) to its ASCII equivilent.

Useful as it saves you having to create a huge list of equivilents and it considers the keyboard layout (eg: French, UK, US) as well as the shift key etc.

ascii_equiv = SCANCODE TO ASCII(scancode())

or for lazy typists...

ascii_equiv = SCTOASCII(scancode())

The DLL is 10KB in size (compresses to 5KB).

Apologies if anyone has released a similar plugin but I was unable to find one so I wrote this

http://www.realgametools.net/forums/attachments/sctoascii.zip
Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 7th Jun 2003 23:04
Hey Rob,

I have a quick question for ya. How do you make these "plug-ins"? Isn't it like a patch? In the newcomer's corner I tried to help a guy with patches. Could u help us?

thx

---Mattman
"Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done." Andy Rooney
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 8th Jun 2003 00:57
I write them with Delphi 6. I believe you can get the Personal Edition for free, certainly the one I am using came free with PCPlus.

They are not "patches", but DLLs (which are like exes but their functions can be accessed by other programs / DLLs) which DBP can use like normal DBP commands. When it compiles the program, if you use a command contained in this DLL, it packs it into the exe and replaces your written command, eg "SCTOASCII", with a link to your DLL command.

The Delphi source code looks something like this:



The project.res file is automatically created, the project.rc file tells DBP which DB code command (MY FUNCTION) links up with which DLL command (MyFunction)

project.rc:



Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 8th Jun 2003 03:25 Edited at: 8th Jun 2003 03:25
Can't you just do this?



"Food is güd!" -Dean
"All programmers are playwrites and all computers are lousy actors" -Anon
Click Here!!!
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 8th Jun 2003 07:32
So DBP can use 'em, but not DBC?

---Mattman
"Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done." Andy Rooney
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 8th Jun 2003 13:27
@andrew

Yes that works fine as well, but there are a few occassions where I have found the need to use the ScanCode instead of Inkey$.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Jun 2003 14:04
@Mattman - you can use DLLs with DBC, but only with the enhancement pack, and accessing them using the CALL DLL function. DBPro has the advantage that user-written DLLs will actually be treated as equivalent to the DBPro core libraries and can be called as built-in instructions.
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 8th Jun 2003 18:00
Kool, I have enhancement pack!

---Mattman
"Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done." Andy Rooney

Login to post a reply

Server time is: 2024-04-23 08:27:30
Your offset time is: 2024-04-23 08:27:30