Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
inserting and replacing lines of text from functions
#5
Ginataras this is almost what I need, I set it up to run a test in Notepad:

here is the sequence I have:

act win(" Notepad" "Notepad")
'Y
str a
int n
for n 1 101
,a.from("test" n)
,key (a)
,'Y
,.....
,.....
,.....
,.....
,.....
,.....
,.....
,.....
,.....
,.....
,.....
,str t tt
tt.getmacro("function0")
foreach t tt
,out "t now contains %t" t
,.....
,.....
,.....
,.....
,.....
,key (t)
,'YYYYY

the problem I have now is that it completes all of the "test" loop before starting the "function0" loop.

I need it to activate "test1"
then the first line from "function0"
then move back to the top and activate "test2"
then the second line from "function0"
and so on, what am I missing to get this to work?

I tried this variation to the sequence:

act win(" Notepad" "Notepad")
'Y
str a
int n
for n 1 101
,a.from("test" n)
,key (a)
,'Y
,.....
,.....
,.....
,.....
,.....
,.....
,.....
,.....
,.....
,.....
,.....
,str t tt
,tt.getmacro("function0")
,foreach t tt
,,out "t now contains %t" t
,,.....
,,.....
,,.....
,,.....
,,.....
,,key (t)
,,'YYYYY

It is a little closer, now it runs the first loop of "test", but it inserts every line from "function0" and then does the same for each loop of "test" this runs into an almost unending notepad page when I test it, lol.

By the way thanks a ton for the help thus far it has been greatly appreciated.


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)