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 


How to make a Form unclickable?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
BobTheBob
How do I cheat?
Reputation: 0

Joined: 03 Jan 2017
Posts: 7

PostPosted: Tue Jan 03, 2017 4:57 am    Post subject: How to make a Form unclickable? Reply with quote

Hi,
I have a Form which is always on top and has the BorderStyle "bsNone". There are no buttons and the Form only shows some information. The user can not interact with it.

I would like to make the Form unclickable (or click-transparent) which means that when I click on the Form, the click goes through the form to something which is behind it.

The problem is that the Form is for a game in fullscreen mode where you can not see the mouse icon. (For example in Skyrim you only see the mouse in the menu.) But when the mouse is over the window the mouse icon is displayed and a click deactivates the game window.

I already managed to hide the mouse icon (set cursor to crNone) but the Form is still clickable.
I had the idea to make an click event which activates the game window when I click on the Form. But I have no idea how I can write this in lua. This would just be a solution if nothing else works Very Happy
How can I do this?
Thanks!
Back to top
View user's profile Send private message
akumakuja28
Master Cheater
Reputation: 16

Joined: 28 Jun 2015
Posts: 432

PostPosted: Wed Jan 04, 2017 8:05 pm    Post subject: Reply with quote

You could work around it with some fuckery like.

1.On form click hide form for 40ms(whatever time)
2.When the form Hides.
3.Include a simple script to execute mouse click again.
4.When the 40ms is up show form again.


Thts one way to approach this I know of no way in LUA to Keep the mouse behind the form.


CLICK Thru the transparent Overlay



Code:


--------------------------------------------------------------------------


Base_Under_Form = createForm()
Base_Under_Form.Height = 500
Base_Under_Form.Width = 700
Base_Under_Form.Left = 800
Base_Under_Form.Top = 400

Base_Under_Button = createButton(Base_Under_Form)
Base_Under_Button.Left = 100
Base_Under_Button.Top = 123
Base_Under_Button.Width = 120
Base_Under_Button.Height = 66
Base_Under_Button.Caption = "Under Overlay Button"
Base_Under_Button.OnClick = function()
                              print("Got Cha Bitch")
                             end

Base_Over_Form = createForm()
Base_Over_Form.Left = Base_Under_Form.Left+5
Base_Over_Form.Top = Base_Under_Form.Top+5
Base_Over_Form.Width = 330
Base_Over_Form.Height = 200
Base_Over_Form.AlphaBlend = true
Base_Over_Form.AlphaBlendValue = 100
Base_Over_Form.FormStyle = "fsStayOnTop"
Base_Over_Form.Color = "0x00976767"


--------------------------------------------------------------------------------
------------  Click Thru Functions ----------------------------------------------
--------------------------------------------------------------------------------

function PutFormBack()
Base_Over_Form.Left = store_pos
--store_pos = nil --broken
end

FormReturnTimer = createTimer()
FormReturnTimer.Interval = 20
FormReturnTimer.Enabled = false
FormReturnTimer.OnTimer = PutFormBack



function ClickThru()
store_pos = Base_Over_Form.Left  -- glabal variable Needed to be read in other function
Base_Over_Form.Left = -10000   ---- MOve Offscreen  -- needs work Doesnt apply to your problem tho
mouse_event(MOUSEEVENTF_LEFTDOWN)
mouse_event(MOUSEEVENTF_LEFTUP)
FormReturnTimer.Enabled = true  --- Timer Activated to rerun form back
end


Base_Over_Form.OnClick = ClickThru



_________________
Back to top
View user's profile Send private message
BobTheBob
How do I cheat?
Reputation: 0

Joined: 03 Jan 2017
Posts: 7

PostPosted: Sun Jan 08, 2017 7:18 am    Post subject: Reply with quote

Thanks I will try it Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting 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