-------------------------------------------------
For example this code work as expected calling the function "©¡" (line 7,16):
Code: Select all
X:=A_ScreenWidth/2 - 16, Y:=A_ScreenHeight/2, ©(,"-Caption +AlwaysOnTop +ToolWindow +Resize","Margin: 1¦1","Font: w1 s15¦Calibri Light"
,"Edit: w2000 h27 WantTab -E0x200 v# +HwndGw -VScroll", "Show: x" X-15 " y" Y " w17 h28"), ¡s("{Down}"), ID:=WinActive("A")
Loop {
©¡(,"#"),
;; GuiControlGet, #
(#<>e ? (#="" ? ©(,"Show: x" X-15 " y" Y " w17 h28") : (@:=¡©¡(#,,15), ©(,"Show: x" X-(@[1]/2)-15 " y" Y " w" @[1]+14 " h28"), e:=#)) :"")
} Until (WinActive("ahk_id " ID) && (GetKeyState("Esc") || GetKeyState("Enter") || GetKeyState("NumpadEnter")))
Msgbox % 1
Msgbox % ((GetKeyState("Esc") ? "" : #), ©(,"Destroy"))
©¡(ByRef a:="", ByRef b:="", ByRef c:="") {
GuiControlGet, %b%
}
¡s(ByRef a) {
SendInput, % a
} ©(ByRef _©:="", ByRef ©*) {
Local c, d, e, f, g, h, i, z
Loop, % (©.Length(), z:=(_© ? _© ": " : "")) {
c:=©[A_Index], d:=InStr(c,"¦¦"), (d ? (e:=SubStr(c,d+2),d:=SubStr(c,1,d-1)) : d:=c)
, f:=InStr(d,"¦"), (f ? (g:=SubStr(d,f+1),f:=SubStr(d,1,f-1)) : f:=d), h:=InStr(f,": "), (h ? (i:=SubStr(f,h+2),h:=SubStr(f,1,h-1)) : h:=f)
If (h="Text" || h="Edit") {
Gui, % z "Add", % h, % i, % g
h:=i:=g:=""
} Else {
Gui, % z h, % i, % g, % e
h:=i:=g:=e:=""
}}} ¡©¡(ByRef a, ByRef b:="Calibri Light", ByRef c:=13) {
Gui, ¡©¡:Font, s%c%, %b%
Gui, ¡©¡:Add, Text, R1, %a%
GuiControlGet, d, ¡©¡:Pos, Static1
Gui, ¡©¡:Destroy
Return, [dW, dH]
}
Code: Select all
a_4_()
a_4_() {
X:=A_ScreenWidth/2 - 16, Y:=A_ScreenHeight/2, ©(,"-Caption +AlwaysOnTop +ToolWindow +Resize","Margin: 1¦1","Font: w1 s15¦Calibri Light"
,"Edit: w2000 h27 WantTab -E0x200 v# +HwndGw -VScroll", "Show: x" X-15 " y" Y " w17 h28"), ¡s("{Down}"), ID:=WinActive("A")
Loop {
©¡(,"#"),
;; GuiControlGet, #
(#<>e ? (#="" ? ©(,"Show: x" X-15 " y" Y " w17 h28") : (@:=¡©¡(#,,15), ©(,"Show: x" X-(@[1]/2)-15 " y" Y " w" @[1]+14 " h28"), e:=#)) :"")
} Until (WinActive("ahk_id " ID) && (GetKeyState("Esc") || GetKeyState("Enter") || GetKeyState("NumpadEnter")))
Msgbox % 1
Return, ((GetKeyState("Esc") ? "" : #), ©(,"Destroy"))
}
©¡(ByRef a:="", ByRef b:="", ByRef c:="") {
GuiControlGet, %b%
}
¡s(ByRef a) {
SendInput, % a
} ©(ByRef _©:="", ByRef ©*) {
Local c, d, e, f, g, h, i, z
Loop, % (©.Length(), z:=(_© ? _© ": " : "")) {
c:=©[A_Index], d:=InStr(c,"¦¦"), (d ? (e:=SubStr(c,d+2),d:=SubStr(c,1,d-1)) : d:=c)
, f:=InStr(d,"¦"), (f ? (g:=SubStr(d,f+1),f:=SubStr(d,1,f-1)) : f:=d), h:=InStr(f,": "), (h ? (i:=SubStr(f,h+2),h:=SubStr(f,1,h-1)) : h:=f)
If (h="Text" || h="Edit") {
Gui, % z "Add", % h, % i, % g
h:=i:=g:=""
} Else {
Gui, % z h, % i, % g, % e
h:=i:=g:=e:=""
}}} ¡©¡(ByRef a, ByRef b:="Calibri Light", ByRef c:=13) {
Gui, ¡©¡:Font, s%c%, %b%
Gui, ¡©¡:Add, Text, R1, %a%
GuiControlGet, d, ¡©¡:Pos, Static1
Gui, ¡©¡:Destroy
Return, [dW, dH]
}
Code: Select all
a_4_()
a_4_() {
X:=A_ScreenWidth/2 - 16, Y:=A_ScreenHeight/2, ©(,"-Caption +AlwaysOnTop +ToolWindow +Resize","Margin: 1¦1","Font: w1 s15¦Calibri Light"
,"Edit: w2000 h27 WantTab -E0x200 v# +HwndGw -VScroll", "Show: x" X-15 " y" Y " w17 h28"), ¡s("{Down}"), ID:=WinActive("A")
Loop {
;; ©¡(,"#"),
GuiControlGet, #
(#<>e ? (#="" ? ©(,"Show: x" X-15 " y" Y " w17 h28") : (@:=¡©¡(#,,15), ©(,"Show: x" X-(@[1]/2)-15 " y" Y " w" @[1]+14 " h28"), e:=#)) :"")
} Until (WinActive("ahk_id " ID) && (GetKeyState("Esc") || GetKeyState("Enter") || GetKeyState("NumpadEnter")))
Msgbox % 1
Return, ((GetKeyState("Esc") ? "" : #), ©(,"Destroy"))
}
©¡(ByRef a:="", ByRef b:="", ByRef c:="") {
GuiControlGet, %b%
}
¡s(ByRef a) {
SendInput, % a
} ©(ByRef _©:="", ByRef ©*) {
Local c, d, e, f, g, h, i, z
Loop, % (©.Length(), z:=(_© ? _© ": " : "")) {
c:=©[A_Index], d:=InStr(c,"¦¦"), (d ? (e:=SubStr(c,d+2),d:=SubStr(c,1,d-1)) : d:=c)
, f:=InStr(d,"¦"), (f ? (g:=SubStr(d,f+1),f:=SubStr(d,1,f-1)) : f:=d), h:=InStr(f,": "), (h ? (i:=SubStr(f,h+2),h:=SubStr(f,1,h-1)) : h:=f)
If (h="Text" || h="Edit") {
Gui, % z "Add", % h, % i, % g
h:=i:=g:=""
} Else {
Gui, % z h, % i, % g, % e
h:=i:=g:=e:=""
}}} ¡©¡(ByRef a, ByRef b:="Calibri Light", ByRef c:=13) {
Gui, ¡©¡:Font, s%c%, %b%
Gui, ¡©¡:Add, Text, R1, %a%
GuiControlGet, d, ¡©¡:Pos, Static1
Gui, ¡©¡:Destroy
Return, [dW, dH]
}
Thanks in advance,