Save Window Position

Posted by Quit on Thu 07 Feb 2019 07:00 PM — 6 posts, 25,068 views.

#0
hi :)

I have for a long time not been able to save my own miniwindows position and I dont know why.

today I try your TabDemo https://www.gammon.com.au/forum/?id=14161 but that will not save position too.

Any idea what I missing

I play on Aardwolf and I use https://fiendish.github.io/aardwolfclientpackage/ this one.

Quit
USA Global Moderator #1
Quote:
I have for a long time not been able to save my own miniwindows position and I dont know why.

By "my own", do you mean plugins that you write yourself or do you mean any miniwindow plugins that you try to use?


If you mean the first one, then we need to see what you're not doing that other plugins are doing.

If you mean the second one, the most common reason for state not saving is that the MUSHclient folder is not in a place that allows MUSHclient to write files for itself. Can you tell us where on your computer your MUSHclient folder is?
Amended on Thu 07 Feb 2019 10:51 PM by Fiendish
#2
Yes my own mini windows is all selfmade and do not save postion.
All the windows from aardwolfclientpackag do save there postion.

I have mush install on my e drive.

I have delete all files in the state folder, no luck.

TabDemo is working but Dont save postion too :(

All my script has more than 6000 char so I put one on pastabin
https://pastebin.com/f1LnHZWx

Quit
#3
My state file e0eb198d8d5698e3b2f61483-1257642da6518030a25c93c4-state.xml

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- MuClient version 5.06-pre -->
<!-- Written by Nick Gammon -->
<!-- Home Page: http://www.mushclient.com/ -->

<!-- Plugin state saved. Plugin: "KillArea". World: "Aardwolf". -->

<muclient>

<!-- variables -->

<variables
   muclient_version="5.06-pre"
   world_file_version="15"
  >
  <variable name="mw_1257642da6518030a25c93c4_KillArea_windowflags">2</variable>
  <variable name="mw_1257642da6518030a25c93c4_KillArea_windowmode">0</variable>
  <variable name="mw_1257642da6518030a25c93c4_KillArea_windowx">1258</variable>
  <variable name="mw_1257642da6518030a25c93c4_KillArea_windowy">301</variable>
</variables>
</muclient>


If I move my window and save world details, it updates my state file with new x and y postion, so thats working.

So its like it dosent read the state file when reinstall script..
USA Global Moderator #4
It looks like your call to movewindow.install is missing the argument that tells it to use a fixed starting location instead of always going to the top right corner.

You should look for where it calls movewindow.install in https://www.gammon.com.au/forum/?id=10728&reply=5#reply5 to see how Nick does it.

Granted it is not a very well documented process because the lua includes aren't part of the extensive help documents here. I regularly forget how to do this. But I'm pretty sure that this is the problem.
Amended on Fri 08 Feb 2019 11:53 PM by Fiendish
#5
Thank you very much :))

All my script had
windowinfo = movewindow.install (win, miniwin.pos_top_right)


I just had to add miniwin.create_absolute_location, true

So it looks like this
windowinfo = movewindow.install (win, miniwin.pos_top_right, miniwin.create_absolute_location, true)


Quit