user5561453
user5561453

Reputation:

Disable button once clicked Cheatengine Lua

So I've been struggling making a button that on pressed goes to a link and toggles Enabled to false so you cant click it anymore

function CEButton1Click(sender)
shellExecute("https://google.com/search")
CEButton1.Enabled=false
end

The above is what I have so far but it does not seem to be working.

Upvotes: 0

Views: 2022

Answers (1)

user142532
user142532

Reputation: 70

The documentation for cheat engine is severely lacking, but sender in that function is actually the button itself. This means you can simple do

sender.Enabled = false

and that successfully disables the button.

It works!

Upvotes: 1

Related Questions