How to redirect the received ID dales in the code?

The first part of the script window and gets its id .
The second part should work in this script , tell me how from the first part to take the ID and paste it in place of %id1%

WinGet, id, list,,, Program Manager
Loop, %id%
{
 this_id := id%A_Index%
 WinActivate, ahk_id %this_id%
 WinGetClass, this_class, ahk_id %this_id%
 WinGetTitle, this_title, ahk_id %this_id%
 MsgBox, 3, 
 , Bypass all Akon n'n%a_index% of %id%`nahk_id %this_id%`nahk_class %this_class%`n%this_title%`n NDO you wish to continue?
 IfMsgBox, No, break
 IfMsgBox Yes, id%A_index%=id1 ; take the value this_id and paste "ahk_id"
 IfMsgBox Cancel exitapp
}


msgbox ( 1-2-3-4+W ) Aegis Prime 3150ms F6"Start" F7"Pause".
vk75::
Loop 
If isKeyPressed :=!isKeyPressed

{



 { 
 ControlSend,, {vk5 7 Down}, ahk_class TargemWindow ahk_id%id1% ; here , 
 ControlSend,, {vk31 Down}, ahk_class TargemWindow ahk_id%id1% ; here 
 KeyWait vk75
 Sleep 3150
 ControlSend,, {vk31 Up}, ahk_class TargemWindow ahk_id%id1% ; here
 ControlSend,, {vk57 Up}, ahk_class TargemWindow ahk_id%id1% ; here
 } 

{
 ControlSend,, {vk57 Down}, ahk_class TargemWindow ahk_id%id1% ; here
 ControlSend,, {vk32 Down}, ahk_class TargemWindow ahk_id%id1% ; here
 KeyWait vk75
 Sleep 3150 
 ControlSend,, {vk32 Up}, ahk_class TargemWindow ahk_id%id1% ; here
 ControlSend,, {vk57 Up}, ahk_class TargemWindow ahk_id%id1% ; here
}

{
 ControlSend,, {vk57 Down}, ahk_class TargemWindow ahk_id%id1% ; here
 ControlSend,, {vk33 Down}, ahk_class TargemWindow ahk_id%id1% ; here 
 KeyWait vk75
 Sleep 3150
 ControlSend,, {vk33 Up}, ahk_class TargemWindow ahk_id%id1% 
 ControlSend,, {vk57 Up}, ahk_class TargemWindow ahk_id%id1% 
 } 
 { 
 ControlSend,, {vk57 Down}, ahk_class TargemWindow ahk_id%id1% 
 ControlSend,, {vk34 Down}, ahk_class TargemWindow ahk_id%id1% 
 KeyWait vk75
 Sleep 3150
 ControlSend,, {vk34 Up}, ahk_class TargemWindow ahk_id%id1% 
 ControlSend,, {vk57 Up}, ahk_class TargemWindow ahk_id%id1% 
 } 
}



return
vk76::Pause
April 4th 20 at 00:50
0 answer

Find more questions by tags MacrosAutoHotkey