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.

DarkBASIC Professional Discussion / simple api for newbie

Author
Message
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 11th Apr 2007 09:40
lol. Ok.

Well, there is a problem with it.... It checks based on mangled names. Its a shame it cant find out the basic values. :/

Cheers,

-db

PS: I believe that I saw something similiar to this for free... Let me check.


Albert Einstein believed that imagination is more important than knowledge.
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 11th Apr 2007 10:34
Oh we got to another page..

well i ask again the question

1. Can u send E-Mail with winapi?

2. Can u check if shiftkey is pressed with winapi? Or checking if u are writing on uppercase.. Cuz i want to take the keystrokes out of program activity!



jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 11th Apr 2007 10:45
...and I shall answer again.
Yes, you can e-mail with MAPI.
Detecting keystrokes is really for the window. (i.e. That is DBPro's job, Windows already puts the messages in the DBPro windows' message queue.)
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 11th Apr 2007 11:33
Actually, I believe DBP uses DirectInput to grab the keystrokes.

Cheers,

-db


Albert Einstein believed that imagination is more important than knowledge.
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 11th Apr 2007 17:22
I know how to get Keystrokes with winapi commands (Uses ASCII) but i cant check if shiftkey is pressed or if u are typing on uppercase with ASCII!! But ill check the MAPI!



White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 11th Apr 2007 18:32
here is how to check if a key is pressed
example shiftkey

for caps use 20 instead of 16
I'll make a list of code and put them up

new learning center comming soon http://911.bounceme.net/
White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 11th Apr 2007 18:49
here is a list of keycodes http://www.adobe.com/livedocs/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001686.html#101039

new learning center comming soon http://911.bounceme.net/
White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 12th Apr 2007 00:03 Edited at: 12th Apr 2007 00:04
transpareant windows
open notepad for this example



more to come

new learning center comming soon http://911.bounceme.net/
White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 12th Apr 2007 02:56 Edited at: 12th Apr 2007 03:08
sending text to notepad from dbpro
open notepad first

more to come

new learning center comming soon http://911.bounceme.net/
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 12th Apr 2007 05:29
Dont forget about sending newlines either.


Cheers,

-db


Albert Einstein believed that imagination is more important than knowledge.
White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 12th Apr 2007 07:22 Edited at: 12th Apr 2007 07:39
well how about postmessage
sending commands to other apps
if you don't have vlc player you can get it from here http://www.videolan.org/vlc/
in this example it shows you how to send play and stop command in vlc mediaplayer


you can use spy++ or simular to get the numbers for differnt programs
anyhow more to come

new learning center comming soon http://911.bounceme.net/
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 12th Apr 2007 15:32
These are very helpfull thanks! One reguest anymore how to send mail i looked for MAPI but i dint really understand it



White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 12th Apr 2007 16:51
i'll look into that

new learning center comming soon http://911.bounceme.net/
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 13th Apr 2007 09:22
There's a dll made by sergy k (I think) which allows the ability to send and retrieve emails.

Cheers,

-db


Albert Einstein believed that imagination is more important than knowledge.
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 13th Apr 2007 15:45
Yes but that dll doesnt work for me.. It doesnt send anything..



White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 13th Apr 2007 16:43 Edited at: 13th Apr 2007 16:47
btw make sure your isp doesn't block port 25 most do you won't beable to send. test it on a lan first set up a mail server on lan to confirm it works.
another thing that is worth buying is styx it will let you make calls from a vbdll i got a tcp/ip server dll that is made in vb that i use with my dbpro games it can be set to send mail but like i said if yor isp blocks port 25 then forget sending unless you use someone elses server that don't have port 25 blocked by isp

new learning center comming soon http://911.bounceme.net/
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 13th Apr 2007 21:52
Well i got sending mails with php.. One day but now the mail sending doesnt work with php..



Dared1111
17
Years of Service
User Offline
Joined: 25th Oct 2006
Location:
Posted: 14th Apr 2007 00:22
Whats the most extensive api

PS. Ankilito... i disagree with your siggy (good is still good)

[link]"http://www.greatgamesexperiment.com/user/Dared1111/" my account on GGE[\link]
White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 14th Apr 2007 00:54
dared1111 what do you mean extensive? as in most features? or what?

new learning center comming soon http://911.bounceme.net/
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 14th Apr 2007 01:23 Edited at: 14th Apr 2007 01:56
Ah... My sig... This can be a hole new thread.

Imagine a world with no evil, no problems, no disasters, and no challenges. There would be no need for soldiers, police, firefighters, diplomats, doctors, or care givers. All the things that made the good people good would be gone. What makes a homeless shelter operator a good person is that they are trying to overcome evil - in this case homelessness. The fight against evil is what gives the good their virtue. Without the evil to fight, there is nothing to distinguish a virtuous person from someone who just doesn't care. They do the same exact thing.

Combining this with my religious beliefs, I think that God, Karma, Allah, or whoever it is, will always keep evil on Earth. Of course, this implies that the fight against evil is pointless. Is it virtuous to waste you time and energy on a pointless battle? Some would consider such a waste a sin, as well considering not fighting evil a sin. Hence a conundrum in the very themes of life...

"There will always be evil, for, without evil, the good shall lose their virtue."
White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 14th Apr 2007 04:00 Edited at: 14th Apr 2007 08:40
adding menu items to any window
open a default project in dbpro


right click on window bar you should see "my new command" on it

more to come

new learning center comming soon http://911.bounceme.net/
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 14th Apr 2007 07:27 Edited at: 14th Apr 2007 07:28
@White Knight
Your code doesnt work. :/

Cheers,

-db

[edit]Your latest code.[/edit]


Albert Einstein believed that imagination is more important than knowledge.
White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 14th Apr 2007 08:42 Edited at: 14th Apr 2007 08:44
fixed it i forgot to include the right window handle when i changed sys to find_system_menu i forgot to update the changes
now to figure out how to get the messages when i click on it.

new learning center comming soon http://911.bounceme.net/
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 14th Apr 2007 08:55
Ok. I will have a look.
btw, if you would like to see some examples of windows gui stuff, you should have a look at my WinGUI thread (last page). Its open source, so you can see all the source.

Cheers,

-db


Albert Einstein believed that imagination is more important than knowledge.
White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 14th Apr 2007 09:00 Edited at: 14th Apr 2007 09:05
k thanks but as for creating a new window i am haveing problems because it requires to have more than 9 parameters i tryied to get them into a type function but just couldn't get it to work correctly.I do have a tcp/ip /udp plugin that requires styx also working on a non styx version it's very simple to use i'll post a it up in a dif thread for styx users.In c++ i can get all the api functions to work fine but i'm tring to get all to work in reg dbpro to see what can be done without use of plugins wich in turn will help others out also.

new learning center comming soon http://911.bounceme.net/
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 14th Apr 2007 09:48
hmm... I know what i'll do. I'll make a simple DLL which allows calling of other dlls for more than 9 parameters. ^_^ I will make it quickly, so expect it up in a few hours, if not a few minutes. However, if I cant get the dll up in a few hours, its simply because im doing research or because something came up.

Cheers,

-db


Albert Einstein believed that imagination is more important than knowledge.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 14th Apr 2007 14:25 Edited at: 14th Apr 2007 14:28
I forgot to post.

Anyways, I have created the dll, and uploaded it here. I have converted your latest code snippet to use this dll.....


Cheers,

-db

PS: This allows up to 15 parameters. If you need more, just say so.

[edit]SORRY FOR DOUBLE POST![/edit]

[edit2]
For some reason, I couldnt save the INI, so here is the contents of the INI.

[/edit2]


Albert Einstein believed that imagination is more important than knowledge.

Attachments

Login to view attachments
White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 15th Apr 2007 01:47
well i can't quite get type to pass the correct values yet but as for the parameters that helps

new learning center comming soon http://911.bounceme.net/
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 15th Apr 2007 02:05
@White Knight
Care to explain a little bit more?

Cheers,

-db


Albert Einstein believed that imagination is more important than knowledge.
C0wbox
17
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 15th Apr 2007 03:35
I think I understand what this all does.

My only concern (being an idiot) is what API means exactly?

Cowbox

Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 15th Apr 2007 04:43
Are you looking for "Advanced Program Interface?"

"There will always be evil, for, without evil, the good shall lose their virtue."
White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 15th Apr 2007 06:03
not really i got plenty of plugins that i made i was tring to get more than 9 parameters for a project that i'm working on.But do post any helpful stuff here for others. And thank you DB user 2006+ for the dll. now
example


new learning center comming soon http://911.bounceme.net/
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 15th Apr 2007 08:11
@White Knight
I believe Ankilito was referring to c0wbox's question (What does API mean?). Also, thank you.

Cheers,

-db


Albert Einstein believed that imagination is more important than knowledge.
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 15th Apr 2007 09:08
Once again, DB is a genius.

"There will always be evil, for, without evil, the good shall lose their virtue."
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 15th Apr 2007 10:47
Well, thank you Ankillito.

Cheers,

-db


Albert Einstein believed that imagination is more important than knowledge.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 15th Apr 2007 14:43
API means Application programming interface.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 15th Apr 2007 22:01
Dang it!!! GOOGLE LIES AGAIN!!!!

Unless, you lie!?!

Who's right, DB user?

"There will always be evil, for, without evil, the good shall lose their virtue."
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 15th Apr 2007 22:10
Quote: "Who's right, DB user?"

I feel insulted..

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 15th Apr 2007 22:15
LINK!!!!

I AM SO STUPID!!!!!!!!!

Sorry, Benjamin. My original responce was going to be that neither of us cited a source. I am so stupid. Sorry, Benjamin.


I'm going to my little Noob corner now....

"There will always be evil, for, without evil, the good shall lose their virtue."
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 16th Apr 2007 01:09
"Application Programming Interface" is correct. I feel a little special now. ^_^ (Dont take that out of context) I believe Benjamin is a better coder than I though. So, perhaps his wisdom will do more good?

Cheers,

-db


Albert Einstein believed that imagination is more important than knowledge.

Login to post a reply

Server time is: 2024-05-06 04:58:36
Your offset time is: 2024-05-06 04:58:36