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 


How do I get CE to NEVER save window positions, ever?

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

Joined: 30 Jan 2023
Posts: 155

PostPosted: Sat May 11, 2024 3:35 pm    Post subject: How do I get CE to NEVER save window positions, ever? Reply with quote

Recently I had an issue with AA windows being off the screen and that was mostly solved in that thread, but my issue has expanded to the point where I need a more intense solution. I need to make it so CE absolutely NEVER saves window positions. I noticed that when I open CE for the first time after installing, there's never confusion of where the window is. Everything appears right in view. This is how I need it to start every time, but without doing a fresh install and without losing other settings.

I do not want CE to remember ANY window positions for ANY of my own CE windows during my sessions. This also applies to the main CE window. How do I just disable CE's saving of all window positions without losing or resetting any other CE settings?

Clarification: The issue is coming from my own window positions somehow being saved wrong. This is not a setting coming from a 3rd party. I don't need to reset existing window positions, I only need CE to stop saving my window positions in the future so they always open in the default location please.


Last edited by Autem on Sat May 11, 2024 3:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1532

PostPosted: Sat May 11, 2024 3:41 pm    Post subject: Reply with quote

CE >> Setting >> General Settings >> Save windows Position (Checked false)

Save setting, reload CE ..

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Autem
Expert Cheater
Reputation: 1

Joined: 30 Jan 2023
Posts: 155

PostPosted: Sat May 11, 2024 3:44 pm    Post subject: Reply with quote

Oh wow thanks! I have no idea how I missed that built in setting. I was thinking this would be much harder. Ha!
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1532

PostPosted: Sat May 11, 2024 3:56 pm    Post subject: Reply with quote

Actually, something different can be tried;

I think that a general position can be determined to open all other window positions during the CE opening, next to the fetus -30 left and +30 Top.

Tell me again if you think it would be better than the solution in settings, let's try this idea.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Autem
Expert Cheater
Reputation: 1

Joined: 30 Jan 2023
Posts: 155

PostPosted: Sat May 11, 2024 4:27 pm    Post subject: Reply with quote

AylinCE wrote:
Actually, something different can be tried;

I think that a general position can be determined to open all other window positions during the CE opening, next to the fetus -30 left and +30 Top.

Tell me again if you think it would be better than the solution in settings, let's try this idea.


That sounds like a good idea. Yes I'd be interested in trying that to see if it's better than the settings toggle. But would it be possible to make it appear in the lower right corner instead? I know it's usually harder to calculate the lower right position due to different resolutions, etc... but if possible the lower right would be best for me.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1532

PostPosted: Sat May 11, 2024 6:28 pm    Post subject: Reply with quote

Paste this into a lua file and drop it into the CE >> autorun folder and test it.

Code:
function addNicePanels(form)
   form.Left = MainForm.Left + 150
   form.Top = MainForm.Top + 50
  end

function postFrm1()
  addNicePanels(getMemoryViewForm())
  addNicePanels(getSettingsForm())
  addNicePanels(getLuaEngine())

  for i=0,getFormCount()-1 do
    local formClassName = getForm(i).ClassName
    if getForm(i).Name~="MainForm" then
      addNicePanels(getForm(i))
     --print(getForm(i).Name)
    end
  end
end

postFrm1()

  registerFormAddNotification(function()
    local t=createTimer()
    t.Interval = 1
    t.OnTimer = function (timer)
      postFrm1()
      timer.destroy()
  end
end)

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Autem
Expert Cheater
Reputation: 1

Joined: 30 Jan 2023
Posts: 155

PostPosted: Sat May 11, 2024 9:50 pm    Post subject: Reply with quote

With Autorun... If I have save window positions on, this will always move the windows over to the lower right of where the last position was. So for example each time, it will be a little further right and down, more and more repeatedly because the script keeps re-activating again if I open any of those targeted windows while I'm using CE. If I have save window positions off, this will always move a little bit to the lower right of the center of the screen, but if I have save window positions off there would be less reason to use the script because I wouldn't need to "rescue" any windows that got remembered offscreen.

Instead of doing Autorun, I'm trying to change it into an AA script so I can just use it if I happen to need it, and only use it once.

Here is the current version I'm working with, without the add notification so it only runs once. I also added the main form to it so if CE main window appears offscreen I can ctrl+o the CT and just hotkey this script to bring the window in.

Code:
[ENABLE]
{$lua}
function addNicePanels(form)
   form.Left = MainForm.Left + 150
   form.Top = MainForm.Top + 50
  end

function postFrm1()
  addNicePanels(getMemoryViewForm())
  addNicePanels(getSettingsForm())
  addNicePanels(getLuaEngine())
  addNicePanels(getMainForm())

  for i=0,getFormCount()-1 do
    local formClassName = getForm(i).ClassName
    if getForm(i).Name~="MainForm" then
      addNicePanels(getForm(i))
    end
  end
end

postFrm1()
 
 
[DISABLE]
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1532

PostPosted: Sun May 12, 2024 8:42 am    Post subject: Reply with quote

Put this code in the atutorun folder and the code will not activate unless you press the relevant key.

Code:
function addNicePanels(form)
   form.Left = MainForm.Left + 150
   form.Top = MainForm.Top + 50
  end

function postFrm1()
  addNicePanels(getMemoryViewForm())
  addNicePanels(getSettingsForm())
  addNicePanels(getLuaEngine())
  addNicePanels(getMainForm())

  for i=0,getFormCount()-1 do
    local formClassName = getForm(i).ClassName
    if getForm(i).Name~="MainForm" then
      addNicePanels(getForm(i))
    end
  end
end

if niceKy1 then niceKy1.Destroy() niceKy1=nil end
niceKy1=createHotkey(postFrm1, VK_LCONTROL,VK_O) -- Ctrl+O



Also, since CE does not record window positions, it seems to be good to open it in the middle of the screen.

At least it opens in a place visible to windows and on the relevant screen. Smile

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Autem
Expert Cheater
Reputation: 1

Joined: 30 Jan 2023
Posts: 155

PostPosted: Sun May 12, 2024 1:47 pm    Post subject: Reply with quote

Oh I like that idea. Very nice. Thanks again!
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 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