Run many instances of the following script and spread GUIs from each other such that all are visible.
Just type a value and press "
Share Variable" button. All the GUIs will reflect the value:
Code:
#SingleInstance, OFF
MsgNum := DllCall( "RegisterWindowMessage", Str,"AHK_SuperGlobal" )
OnMessage( MsgNum, "ReadVar" )
IniRead, SharedGlobal, %A_Temp%\Shared.INI, GlobalVariable, SharedGlobal, 0
Gui, +ToolWindow
Gui, Add, Edit, w100 h25 vSharedGlobal, %SharedGlobal%
Gui, Add, Button, x+5 w85 h25 +Default gShareVar, Share Variable
Gui, Show, , Shared Global Var!
Return
ShareVar:
GuiControlGet, SharedGlobal
IniWrite, %SharedGlobal%, %A_Temp%\Shared.INI, GlobalVariable, SharedGlobal
SendMessage, MsgNum, 0,0,, ahk_id 0xFFFF
Return
GuiClose:
ExitApp
Return
ReadVar() {
Global SharedGlobal
IniRead, SharedGlobal, %A_Temp%\Shared.INI, GlobalVariable, SharedGlobal
GuiControl,, SharedGlobal, %SharedGlobal%
Return True
}
The effect can be achieved without an INI, but already its too much code.
