Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Multi-Monitor management


  • Please log in to reply
No replies to this topic
Oldman
  • Members
  • 2475 posts
  • Last active: Feb 18 2015 04:57 PM
  • Joined: 01 Dec 2013

In a multi-monitor environment, when you launch a script, AutoHotkey displays Gui, InputBox and Progress Bar windows on the primary monitor (by default).

 

"GuiClass", "InputBoxClass" and "ProgressClass" enable to display Gui, InputBox and Progress Bar windows on the primary or on the secondary monitor depending on the last coordinates (active window or mouse position).

 

You do not need anymore to save the last positions of your windows in a configuration file.

 

In addition, with the GuiClass, you can provide width and/or height to emulate a smaller screen size. In this case, width and height are the sizes of the virtual screen, not the sizes of the window's client area. This can be helpfull to prepare a script on your desktop, for use on a laptop or a tablet with a smaller screen size.

 

The 3 classes are designed to run on AutoHotkey v1.1.11+ ANSI & UNICODE (32 and 64 bits), on Windows XP+.

They used "MessageLib" which enables to manage the display of the info and error message in a standard way.

 

Download here : Multi-Monitor.7z

 

GuiClass

 

Instantiate the class for each Gui with the Gui handle as a parameter.

Then, replace the "Gui, Show" command by the InstanceName.Show() method.

 

InputBoxClass

 

Instantiate the class only once.

Then, replace the "InputBox" command by the InstanceName.Show() method.

 

ProgressClass

 

Instantiate the class only once.

Then, replace the first "Progress" command by the InstanceName.Show() method.

The first Progress command is the command where you initialize all the parameters of the Progress Bar.

 

 

The "GuiClass" uses the Fnt.ahk library (v0.5) from jballi found in the forum under the topic :

"[Library] Fnt v0.5 (Preview) - Do Stuff With Fonts"

http://www.autohotke...uff-with-fonts/.

A special thanks for his good job.


Si ton labeur est dur et que tes résultats sont minces, souviens toi du grand chêne qui avant n'était qu'un gland....comme toi ! (anonyme) ;)

L'art de lire, c'est l'art de penser avec un peu d'aide. (É. Faguet)

Windows 3.1. Collector's Edition.     (www.avaaz.org)