|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
HexaG0n Advanced Cheater Reputation: 0
Joined: 29 Mar 2021 Posts: 64
|
Posted: Fri Mar 31, 2023 8:45 am Post subject: Creating a chart |
|
|
How can i create a chart [ TChart ] in CE Lua?? Or something so i can graph values...
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
|
Back to top |
|
|
HexaG0n Advanced Cheater Reputation: 0
Joined: 29 Mar 2021 Posts: 64
|
Posted: Fri Mar 31, 2023 10:48 pm Post subject: |
|
|
How can i make a line series with this? I want to make something like this
|
|
Back to top |
|
|
LeFiXER Grandmaster Cheater Supreme Reputation: 20
Joined: 02 Sep 2011 Posts: 1055 Location: 0x90
|
Posted: Sun Apr 02, 2023 7:40 am Post subject: |
|
|
HexaG0n wrote: | How can i make a line series with this? I want to make something like this
|
Using the information DB linked you can do it. Create a diagram, a table of blocks which include the data of each block like X,Y, width, height etc... then link the blocks together using addConnection(source, destination).
|
|
Back to top |
|
|
HexaG0n Advanced Cheater Reputation: 0
Joined: 29 Mar 2021 Posts: 64
|
Posted: Sun Apr 02, 2023 8:52 am Post subject: |
|
|
what about the grid at the background? i also want it to be zoomable, etc. and can display values.
making something whole with that diagram class is pretty time staking... is there really no TChart in CE?
|
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1260
|
Posted: Sun Apr 02, 2023 12:07 pm Post subject: |
|
|
Do this in C++ or #C and if you want to use it in (Visual Studio) CE use the form parent in the CE Form window.
( As : https://forum.cheatengine.org/viewtopic.php?p=5758399#5758399 )
Code: | f1 = createForm()
f1.setSize(640,500)
f1.Caption = 'Test Apps Inside The Boundaries'
b1 = createButton(f1)
b1.setPosition(570,460)
b1.setSize(60,30)
b1.Caption = 'Launch'
function SetParent(hWndChild, hWndNewParent)
return executeCodeLocalEx('user32.SetParent', hWndChild, hWndNewParent)
end
function SetWindowPos(hwnd, hWndInsertAfter, x, y, cx, cy, wFlags)
return executeCodeLocalEx('user32.SetWindowPos', hwnd, hWndInsertAfter, x, y, cx, cy, wFlags)
end
function MoveWindow(hwnd, x, y, cx, cy, repaint)
local rp
if repaint then
rp=1
else
rp=0
end
return executeCodeLocalEx('user32.MoveWindow', hwnd, x, y, cx, cy, rp)
end
function launch()
ps1 = 'start notepad.exe'
p1 = os.execute(ps1)
sleep(1000)
openProcess('notepad.exe')
w=getWindow(getForegroundWindow(), GW_HWNDFIRST)
pid=getOpenedProcessID()
while w and (w~=0) do
if (getWindowProcessID(w)==pid) and (executeCodeLocal("IsWindowVisible",w)~=0) then
--print(w..' - '..getWindowCaption(w)..'('..getWindowClassName(w)..')')
SetParent(w, f1.handle)
MoveWindow(w, 10, 20, 400, f1.Height-100, 1)
end
w=getWindow(w, GW_HWNDNEXT)
end
end
b1.OnClick = launch |
But it can be difficult to pass the return values to CE as I don't know what to associate it with. So the return values should appear in the form you made in VS.
Or, while preparing the VS form, you can save the return values in a folder (Temp >> example.txt) and read and print them with the CE form.
Edit:
As different.
A CE Form start to your project;
Code: | f1 = createForm()
f1.setSize(500,500)
f1.Caption = 'Test'
local tbl1 = {}
tbl1.pnl1 = createPanel(f1)
tbl1.pnl1.Height = f1.Height - 60
tbl1.pnl1.Width = f1.Width - 60
tbl1.pnl1.Left = 30
tbl1.pnl1.Top = 30
tbl1.pnl2 = createPanel(tbl1.pnl1)
tbl1.pnl2.Height = tbl1.pnl1.Height - 45
tbl1.pnl2.Width = tbl1.pnl1.Width - 45
tbl1.pnl2.Left = 22
tbl1.pnl2.Top = 22
function onLineLeft(p1,p2,space)
local nTop = space - 12
local space1 = math.floor(p2.Width / tonumber(space))
--print(space1)
local rep1 = tonumber(p2.Width) / 3
local cpt1 = string.rep(". ",math.floor(rep1))
local line1 = math.floor(space1 - 1) * 10
--print(line1)
for i=1, space1 do
tbl1["dlbl"..i] = createLabel(p1)
tbl1["dlbl"..i].Left=5
tbl1["dlbl"..i].Top=tonumber(nTop) + 27
tbl1["dlbl"..i].Caption=line1
tbl1["elbl"..i] = createLabel(p2)
tbl1["elbl"..i].Left=0
tbl1["elbl"..i].Top=tonumber(nTop)
tbl1["elbl"..i].Caption=cpt1
tbl1["elbl"..i].Font.Size=12
tbl1["elbl"..i].Font.Color=0xff
tbl1["flbl"..i] = createLabel(p1)
tbl1["flbl"..i].Left=p2.Width + p2.Top + 4
tbl1["flbl"..i].Top=tonumber(nTop) + 27
tbl1["flbl"..i].Caption=line1
line1 = tonumber(line1) - 10
nTop=tonumber(nTop) + tonumber(space)
end
end
function onLineTop(p1,p2,space)
local nLeft = space
local space1 = p2.Width / tonumber(space)
local rep1 = tonumber(p2.Height)
local cpt1 = string.rep(":\n",math.floor(rep1))
local line1 = 0
for i=1, space1 do
tbl1["albl"..i] = createLabel(p1)
tbl1["albl"..i].Left=tonumber(nLeft) + 21
tbl1["albl"..i].Top=5
tbl1["albl"..i].Caption=line1
tbl1["blbl"..i] = createLabel(p2)
tbl1["blbl"..i].Left=tonumber(nLeft)
tbl1["blbl"..i].Top=0
tbl1["blbl"..i].Caption=cpt1
tbl1["blbl"..i].Font.Size=10
tbl1["blbl"..i].Font.Color=0xff
tbl1["blbl"..i].Font.Style="fsBold"
tbl1["clbl"..i] = createLabel(p1)
tbl1["clbl"..i].Left=tonumber(nLeft) + 21
tbl1["clbl"..i].Top=p2.Height + p2.Top + 3
tbl1["clbl"..i].Caption=line1
line1 = i*2
nLeft=tonumber(nLeft) + tonumber(space)
end
end
onLineLeft(tbl1.pnl1,tbl1.pnl2,50)
onLineTop(tbl1.pnl1,tbl1.pnl2,50) |
You can add or change things.
Description: |
|
Filesize: |
9.94 KB |
Viewed: |
1705 Time(s) |
|
_________________
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Thu Apr 06, 2023 1:44 am Post subject: |
|
|
DB, I think not register yet on CE Lua define.
It's return error "attempt to call a nil value global 'createBlock()"
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Thu Apr 06, 2023 1:47 am Post subject: |
|
|
it's a method of the diagram class, you call it using a diagram object
e.g
Code: |
d=createDiagram(someform)
d.align=alClient
b=d.createBlock()
|
_________________
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 |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Thu Apr 06, 2023 5:46 am Post subject: |
|
|
Dark Byte wrote: | it's a method of the diagram class, you call it using a diagram object
e.g
Code: |
d=createDiagram(someform)
d.align=alClient
b=d.createBlock()
|
|
I see, so this
not
Thanks DB
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
|
Back to top |
|
|
|
|
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
|
|