
sorry strobo.. wohl überlesen

Moderator: jNizM
Du meinst aber hoffentlich nicht das von AHK unter der Bezeichnung ID gelieferte Handle?strobo wrote:... , btw numerical-window-id hätte das problem nicht.
Code: Select all
Loop, Parse, SECTION_TEXT,`n
{
SectionFound:=1
Win_Title:="", Win_x:=0 , Win_y:=0, Win_width:=0, Win_height:=0, Win_maximized:=0
;Parse the elements in the CSV to extract recorded data
Loop, Parse, A_LoopField, CSV
{
EqualPos:=InStr(A_LoopField,"=")
Var:=SubStr(A_LoopField,1,EqualPos-1)
Val:=SubStr(A_LoopField,EqualPos+1)
IfInString, ParmVals, %Var%
{
;Remove any surrounding double quotes (")
If (SubStr(Val,1,1)=Chr(34))
{
StringMid, Val, Val, 2, StrLen(Val)-2
}
Win_%Var%:=Val
}
}
;Seems to be an iteration problem...
if (Win_Title = "")
continue
;Make sure we're matching something new each time we move a window
WinGet, matches, list, %Win_Title%,,,
m_id := ""
Loop, %matches%
{
cid := matches%A_Index%
Loop, %handle_list%
{
h := handle_list%A_Index%
if (h = cid)
{
m_id := cid
WinGet, MainState, MinMax, ahk_id %m_id%
msgbox % "Win_maximized=" Win_maximized " - MainState=" MainState " - m_id=" m_id
handle_list%A_Index% := 0
break 2
}
}
}
if (Win_maximized=1)
msgbox buh
If ((Win_maximized = 1) and (m_id not = ""))
{
if (MainState=0 || MainState=-1)
msgbox
WinRestore, ahk_id %m_id%
WinActivate, ahk_id %m_id%
WinMaximize, ahk_id %m_id%
PostMessage, 0x112, 0xF030,,, ahk_id %m_id% ; 0x112 = WM_SYSCOMMAND, 0xF030 = SC_MAXIMIZE
WinGetTitle, t, ahk_id %m_id%
msgbox
} Else If ( (StrLen(Win_Title) > 0) and (m_id not = "") )
{
WinRestore, ahk_id %m_id%
WinActivate, ahk_id %m_id%
WinGetTitle, t, ahk_id %m_id%
WinMove, A,,%Win_x%,%Win_y%,%Win_width%,%Win_height%
}
}
Meinst du während des parsen oder hinterher?just me wrote:Es gibt aber auch die Option, andere unerwünschte Zeichen entfernen zu lassen.
Users browsing this forum: pizzapizze and 3 guests