Mirage Source

Free ORPG making software.
It is currently Thu Mar 28, 2024 7:57 pm

All times are UTC


Forum rules


Make sure your tutorials are kept up to date with the latest MS4 releases.



Post new topic Reply to topic  [ 1356 posts ]  Go to page 1, 2, 3, 4, 5 ... 55  Next
Author Message
 Post subject: [Fix] Fixing input
PostPosted: Tue Jul 28, 2009 8:10 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Wrote this up for RootSource on OGC, figured you guys could benefit from it?

Nean wrote:
I just spent the last two and a half hours working on this, so somebody better appreciate it. For spending so long, it's a very few lines of code. Anyways here goes

Add:
Code:
Public Declare Function GetForegroundWindow Lib "user32" () As Long
in ModInput

Then replace:
Code:
Call CheckInputKeys ' Check which keys were pressed


With:
Code:
        If GetForegroundWindow() = frmMainGame.hwnd Then
            Call CheckInputKeys ' Check which keys were pressed
        End If


Voila, done. Now it only responds if the current window is RootSource

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Tue Jul 28, 2009 10:44 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
I rated this topic:

Image Image Image Image Image

Good job.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Tue Jul 28, 2009 6:55 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
DFA wrote:
fully tested? wow if it works right
the best thing i've found was a pretty lengthy module that checks if a window has focus


Haha yeah, I spent two hours alternating writing functions/using booleans trying to determine if the window had focus, and then I stumbled across a GetActiveWindow API, but that didn't work. Another thirty minutes of research, trying to figure it out lead me to the GetForeGroundWindow API which worked flawlessly.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Wed Jul 29, 2009 12:49 am 
Offline
Banned
User avatar

Joined: Mon Jun 05, 2006 9:22 pm
Posts: 394
Location: USA
Good to see some leakage from OGC here. :3


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Wed Jul 29, 2009 4:27 am 
Offline
Banned
User avatar

Joined: Mon Jun 05, 2006 9:22 pm
Posts: 394
Location: USA
Fail how? it works with only a few lines of code to fix a mistake you made.


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Wed Jul 29, 2009 12:49 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
James wrote:
Fail how? it works with only a few lines of code to fix a mistake you made.


lol, Dmitry got burned.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Wed Jul 29, 2009 2:07 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Wait, so this is unsatisfactory? Elaborate.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Wed Jul 29, 2009 5:01 pm 
Offline
Persistant Poster

Joined: Fri Jun 26, 2009 10:15 pm
Posts: 701
Google Talk: FAProductions
Lol. DFA was kidding, he was just mad you fixed something he broke. :P


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Wed Jul 29, 2009 7:42 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Damn, I need to stop posting drunk. I don't figure these things out.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Wed Jul 29, 2009 8:54 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Nean wrote:
Damn, I need to stop posting drunk. I don't figure these things out.


Dmitry is high on crack. I never understands anything.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jul 31, 2009 10:37 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Added it to Silverdale. Modded it a bit to allow game input on several forms, but it works like a charm.

+1 rep.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jul 31, 2009 6:27 pm 
Offline
Banned
User avatar

Joined: Mon Jun 05, 2006 9:22 pm
Posts: 394
Location: USA
DFA wrote:
i was totally gonna try it with my DirectInput8 system last night, had the page open and everything...then got distracted ><


Happens to the best of us.


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Wed Dec 01, 2021 9:17 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтsemiasphalticfluxсайтсайтсайт
сайтсайтсайтсайтсайтсайтhttp://taskreasoning.ruсайтсайтсайтинфосайтсайтtuchkasсайтсайт


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jan 07, 2022 6:07 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Econ


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jan 07, 2022 6:08 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
115.9


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jan 07, 2022 6:09 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Bett


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jan 07, 2022 6:10 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Bett


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jan 07, 2022 6:11 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Thom


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jan 07, 2022 6:13 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Mohi


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jan 07, 2022 6:14 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Shop


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jan 07, 2022 6:15 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Gera


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jan 07, 2022 6:16 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Robe


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jan 07, 2022 6:17 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Vide


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jan 07, 2022 6:18 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
EyeT


Top
 Profile  
 
 Post subject: Re: [Fix] Fixing input
PostPosted: Fri Jan 07, 2022 6:20 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Fisk


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1356 posts ]  Go to page 1, 2, 3, 4, 5 ... 55  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group