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 


The lua script in this trainer has some issues and will ther

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

Joined: 13 Sep 2018
Posts: 189

PostPosted: Thu May 16, 2019 8:38 pm    Post subject: The lua script in this trainer has some issues and will ther Reply with quote

I just used the CMD command


Error.png
 Description:
 Filesize:  197.39 KB
 Viewed:  3584 Time(s)

Error.png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25284
Location: The netherlands

PostPosted: Fri May 17, 2019 12:04 am    Post subject: Reply with quote

try as a standalone script first and see what message that gives when you execute the lua code
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 189

PostPosted: Fri May 17, 2019 4:11 am    Post subject: Reply with quote

Dark Byte wrote:
try as a standalone script first and see what message that gives when you execute the lua code

Some computers will not prompt, some will prompt. I wonder if it has anything to do with computers
Can you give it a try?
Code:

f=createForm(true)
f.setSize(700,400)
m=createMemo(f)
m.Align='alClient'
m.ScrollBars='ssAutoBoth'
g=createPanel(f)
g.Align='alBottom'
g.caption='Getipconfig'
function ipconfig()
  os.execute('ipconfig /all > "C:/Windows/System32/drivers/systemA.ini"')
  local f=io.open('C:/Windows/System32/drivers/systemA.ini')
  local line=f:read('a')
  if line then
    m.Lines.Text=line
    f:close()
    os.remove('C:/Windows/System32/drivers/systemA.ini')
  end
end
g.OnClick=ipconfig
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25284
Location: The netherlands

PostPosted: Fri May 17, 2019 4:14 am    Post subject: Reply with quote

Works for me, but then again I have windows installed in c:\windows

what happens on systems that have it installed in z:\win7 ?

Tip another way to get it without the need of a tempfile is using
Code:

local z=io.popen('ipconfig /all')
local out=z:read('*all')
z:close()
print(out)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 189

PostPosted: Fri May 17, 2019 5:50 am    Post subject: Reply with quote

Dark Byte wrote:
Works for me, but then again I have windows installed in c:\windows

what happens on systems that have it installed in z:\win7 ?

Tip another way to get it without the need of a tempfile is using
Code:

local z=io.popen('ipconfig /all')
local out=z:read('*all')
z:close()
print(out)

Maybe I can try this one, but I'm not sure if there will be that wrong window.

Can I hide the CMD window? Let it run in the background,But I don't know how to do it.
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