Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Writing string to file from Array.
#1
I am trying to setfile a str.
Not sure why it's not working. Code - output - and file, below:

CODE:
Macro Macro7
Code:
Copy      Help
out
ARRAY(int) a; int i; str sc sn
out "[][9]ALL VISIBLE WINDOWS"
win("" "" "" 0 0 0 a)
for(i 0 a.len)
,sc.getwinclass(a[i])
,sn.getwintext(a[i])
,out "%i '%s' '%s'" a[i] sc sn
,sn.setfile("C:\wn.txt" 0 -1)

OUTPUT:

Start

QM TOOLBAR
Quick Macros - Main - [Macro6]
QM Help
Quick Macros Forum • Index page - Google Chrome
Local Disk (CSmile
UT
OC
Program Manager

FILE:

Program Manager
#2
you need to store all the variables into 1 string before saving.
try this
Function Function10
Code:
Copy      Help
out
ARRAY(int) a; int i; str sc sn
out "[][9]ALL VISIBLE WINDOWS"
win("" "" "" 0 0 0 a)
for(i 0 a.len)
,sc.getwinclass(a[i])
,sn.getwintext(a[i])
,str ft=F"{a[i]} '{sc}' '{sn}'"
,out ft
,ft.setfile("C:\wn.txt" -1 -1 1)


Forum Jump:


Users browsing this thread: 1 Guest(s)