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 


This has to be easy. What is wrong?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
rog9001
Expert Cheater
Reputation: 2

Joined: 22 Dec 2015
Posts: 214
Location: Jupiter

PostPosted: Wed Jul 06, 2016 5:45 pm    Post subject: This has to be easy. What is wrong? Reply with quote

I am trying to make a button which attaches a process and if attached then make image visible and if not then the image is not visible.
Here is what I tried but its 100% wrong. could someone tell me whats wrong.

Code:

function CEButton1Click(sender)
if openProcess("W8.1EntryPoint.exe") then
setProperty(CETrainer.CEImage1, Visible == 1)
else
setProperty(CETrainer.CEImage1, Visible == 0)
end
end


I am sure that the "Visible == 1/0" is the wrong part but I don't know what its meant to be.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Wed Jul 06, 2016 5:55 pm    Post subject: Reply with quote

Code:
function CEButton1Click(sender)
  CETrainer.CEImage1.Visible = openProcess("W8.1EntryPoint.exe") ~= nil
end

_________________
I don't know where I'm going, but I'll figure it out when I get there.
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