0

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.

  • What is not working? The click isn't working, the button remains enabled? – Adam B Feb 22 '16 at 21:45
  • Yes the button remains enabled. –  Feb 22 '16 at 21:47
  • also setEnabled("false") doesent work. –  Feb 22 '16 at 21:49
  • 1
    So... You are expecting Cheat Engine - a program to operate on many other programs as generically as possible - to automatically know that the launched program is a web browser, find the checkbox in memory after the page has loaded, and be able to set it? And to expose it under the names that you've guessed? – Colonel Thirty Two Feb 22 '16 at 23:12
  • Doesn't sound like thats what @Tero is trying to do. If you print the button status does it make sense? Not familiar with cheatengine but something like `print(CEButton.getEnabled)` – Adam B Feb 23 '16 at 00:51

1 Answers1

1

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!

user142532
  • 70
  • 6