avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday May 14, 2021, 6:59 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Other Variables in Grid definitions  (Read 4716 times)


  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Other Variables in Grid definitions
« on: April 09, 2012, 11:27 AM »

Just found GridMove today and loving it!

I am using it because I have a new triple-monitor setup and I've got issues with Eyefinity being turned on/off and then Windows (7) Resolution and monitor layouts getting all confused.  So I've decided to just leave Eyefinity enabled all the time.

With Eyefinity enabled you effectively have only ONE monitor, so Win 7 Snap and Maximize doesn't work as desired, thus GridMove to the rescue.

I've got three 1920x1200 monitors combining to create a single 6044x1200 desktop (not 5760x1200 - there's additional width of 284 added for bezel compensation, which may be evenly split into two 142px strips, or it may be 141+143 - I can't tell)

The problem(s): The the [Monitor1Right] variable/element is 6044 not 1920.  None of the built-in variables know the true 1920 width of the physical display.  My grid definition is ending up with lots of "hard-coded" numbers like this:

Code: Text [Select]
  1. ; Middle-full-screen
  2. GridLeft      = 1920 + 141
  3. GridRight    = 1920 + 141 + 1920

What I would like to do is define some variables up front:

Code: Text [Select]
  1. [MonitorWidth] = 1920
  2. [BezelLeftWidth] = 141
  3. [BezelRightWidth] = 143

Then all the grids would have nice formulas like this:

Code: Text [Select]
  1. ; Middle-full-screen
  2. GridLeft      = [MonitorWidth] + [BezelLeftWidth]
  3. GridRight    = [MonitorWidth] + [BezelLeftWidth] + [MonitorWidth]

Does this make sense? 

I can go with hard coded numbers if needed, but the grid becomes locked to my particular installation and if I recalibrate the bezel compensation I need to search/replace "141" throughout the file rather than once in the variable definition.

I tried downloading the source code to see how GridMove works internally but the source code link is broken:
http://jgpaiva.dcmem...ridMove/ is 404.  (Also tried with a 7z extension.)

Once again, thanks for a fantastic utility.  Donation on its way!


  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Other Variables in Grid definitions
« Reply #1 on: April 09, 2012, 05:13 PM »
Hi psyFungi,

Unfortunately, those variables (MonitorWidth, monitorRealWidth and so on) are obtained directly from the language GridMove is programmed with, so they can't be modified.
At the time I implemented the grid parser, I tried to have variables for creating grids, it makes much sense, however I found it to too hard to do, especially without interfering with other variables of the program.

Thanks for the heads-up on the source code archive, it had to be removed due to some trouble with antiviruses (I was an idiot and left some .exe there). I have uploaded it again, should be OK now. As a bonus, you also get a more recent version of the code than the compiled one.