Bsically instead of a large gap after resizing the control, I want the control after the resized box, to start next to the resized edit box ...
So type something in box c & box d repositions itself next to box c, as do all the boxes after it
But only on the current line of the edit box ...
The variable im using to reposition "xsxc" is at line 98
I've also extracted the size of the string in the editbox at line 91 labelled "length"
Much appreciated, thanks!!!
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
autotrim, off
msgbox type in guiwinx to mirror in 2nd win
setBatchLines -1
lp=0
y:=10
gui,4:add,text,section -vscroll x0 y%y% w0 h0, ;-- set position for y
loop,10
{
loop,7
{
lp++
Gui, 4:Add, Edit, r2 -vscroll x+7 y%y% w90 h30 gCopyText vedit%lp%
}
gui,4:add,text, section -vscroll x0 y0 w0 h0, ;-- set position for x
y +=35
}
lp:=0
Gui,4:show,autosize x0 y150 h900,guiWINxx
setBatchLines -1
lp=0
y:=10
gui,4:add,text,section x0 y%y% w0 h0, ;-- set position for y
loop,10
{
loop,7
{
lp++
Gui, 5:Add, Edit, x+7 y%y% w90 h30 -Multi veditx%lp%
}
gui,5:add,text, section x0 y0 w0 h0 , ;-- set position for x
y +=35
}
Gui,5:show,autosize x702 y250 h900, inputx
CopyText:
{
Gui, 4: Submit, nohide ; directs all text typed to gui box 1
ControlGetFocus, OutputVar, guiWINxx
newvarcsx := RegExReplace( OutputVar, "\D")
xsc:=newvarcsx-1
xscd=edit%xsc%
ControlGetPos, xs, ys, ws, hs, %OutputVar%, guiWINxx
ControlGetPos, xsx, ysx, wsx, hsx, %xscd%, guiWINxx
ControlGetText, whcyxc, %OutputVar%, guiWINxx
edit4:=""
newvarcsxt := RegExReplace( OutputVar, "\D")
tooltip, %OutputVar% %whcyxc%
StringReplace, text, MyText,%A_Space%,_, All
iniwrite, %whcyxc%, %x1%, winxlxc, winxlxc%newvarcsxt%
StringReplace, text, whcyxc,_, %A_Space% , All
StringLen, length, text
length:=length*7
ys:=ys-25
ysx:=ysx-25
xsxc:=xsx-length ; move textbox to position ending of preceding textbox
tooltip, %OutputVar% xs%xs% ys%ys% %text% %xscd% xsx%xsx% ysx%ysx% ws%ws%
GuiControl, 5:Text, %OutputVar%, % text
GuiControl, 5:Move, %OutputVar%, x%xsxc% y%ysx% w%length% h100
ControlGetPos, xs, ys, ws, hs, %OutputVar%, guiWINxx
;settimer, spacex, 10
}
return