05-26-2023, 04:27 PM
Hi, I was trying to log all windows that has different name, but same class into text file. below are my code
del "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt"
str s1 s2 f
f="$desktop$\PTBOTSYSTEM\LOGS\LOG.txt"
s1.setfile(f)
s2.getfile(f)
int wz=win("OpenKore" "ConsoleWindowClass" "" 0x0 "style=0x14EF0000")
str txt.getwintext(wz)
int wz2=win("OpenKore" "ConsoleWindowClass" "" 0x0 "style=0x14EF0000")
str txt2.getwintext(wz2)
LogFile("######################" 0 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
LogFile(" " 1 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
LogFile("######################" 0 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
LogFile("--------------------------------------------------------------------------------------------------" 0 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
LogFile(txt.getwintext(wz) 0 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
LogFile(txt.getwintext(wz2) 0 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
LogFile("--------------------------------------------------------------------------------------------------" 0 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
run "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt" "" "" "" 3
This is whats shows at the text file:
######################
5/27/2023 12:08:43 AM
######################
--------------------------------------------------------------------------------------------------
VV01X2: B49 (39.94%), J38 (45.71%) : w21% : 134,178 pay_fild02 [route,attack,checkMonsters,route] - OpenKore
VV01X2: B49 (39.94%), J38 (45.71%) : w21% : 134,178 pay_fild02 [route,attack,checkMonsters,route] - OpenKore
--------------------------------------------------------------------------------------------------
What I expected to see in text file:
Image Link
Pls help me, thanks.
del "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt"
str s1 s2 f
f="$desktop$\PTBOTSYSTEM\LOGS\LOG.txt"
s1.setfile(f)
s2.getfile(f)
int wz=win("OpenKore" "ConsoleWindowClass" "" 0x0 "style=0x14EF0000")
str txt.getwintext(wz)
int wz2=win("OpenKore" "ConsoleWindowClass" "" 0x0 "style=0x14EF0000")
str txt2.getwintext(wz2)
LogFile("######################" 0 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
LogFile(" " 1 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
LogFile("######################" 0 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
LogFile("--------------------------------------------------------------------------------------------------" 0 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
LogFile(txt.getwintext(wz) 0 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
LogFile(txt.getwintext(wz2) 0 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
LogFile("--------------------------------------------------------------------------------------------------" 0 "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt")
run "$desktop$\PTBOTSYSTEM\LOGS\LOG.txt" "" "" "" 3
This is whats shows at the text file:
######################
5/27/2023 12:08:43 AM
######################
--------------------------------------------------------------------------------------------------
VV01X2: B49 (39.94%), J38 (45.71%) : w21% : 134,178 pay_fild02 [route,attack,checkMonsters,route] - OpenKore
VV01X2: B49 (39.94%), J38 (45.71%) : w21% : 134,178 pay_fild02 [route,attack,checkMonsters,route] - OpenKore
--------------------------------------------------------------------------------------------------
What I expected to see in text file:
Image Link
Pls help me, thanks.