Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Saw something interesting in main.lua

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Wed Dec 19, 2012 2:16 pm    Post subject: Saw something interesting in main.lua Reply with quote

Hey,
I saw in main.lua
the following line
Code:
getForegroundProcess()

Its pretty awesome Smile...
I want to use it..
So I wrote this
Code:
function CEButton1Click(sender)
local proc=getForegroundProcess()
openProcess(proc)
end

createHotkey(CEButton1Click, VK_1)

Its working great.
But the thing is, I try to attach with google chrome.
And its attaching to the main processor (browser itself).
And I want to attach to the flash player..

I don't want to attach by getting processor ID.
But I do got a suggestion, can we attach to the processor that is being focused?
(In browser if you focused in a flash, ctrl+w won't shut down the tab, f11 won't go to full screen mode.. etc.)
It'll be pretty useful for me.
Thanks for reading.


EDIT:
I've got an alternative way.. by going to full screen mode in flashplayer, but the thing is that NOT all games let you go to fullscreen.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Dec 20, 2012 10:26 am    Post subject: Reply with quote

getForegroundProcess will only get the parent process that is focused. The control inside the browser is seen as a child and in most cases is not its own parent so 'getForegroundProcess' will not see it.

It is simply a wrapper around GetForegroundWindow so it does not do anything special to obtain the foreground process.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites