i used an array that goes something like this:
Let>a=0
Label>Loop
Let>a=a+1
GetClipBoard>k_%a%
Writeln>c:\txtfile.txt,result,k_%a%
Goto>Loop
the output i got was:
k_1
k_2
k_3
k_4
....
when i used the Message command to display the k_%a%'s it did it just fine, what made me think that the problem lies in the WriteLn command.
Help please!
WriteLn doesnt seem to recognise arrays
Moderators: JRL, Dorian (MJT support)
CatBreath,
Recently discussed this topic here:
http://www.mjtnet.com/usergroup/viewtopic.php?t=2067
Basically, in certain circumstances using Macro Scheduler, you need to pass the arrayed value to a more static variable before you can use it. I don't know any hard and fast rules for determining those "certain circumstances" but this is one of them. Typically I create the second variable any time I use an array. Prevents hair pulling.
Try something like:
Let>a=0
Label>Loop
Let>a=a+1
GetClipBoard>k_%a%
Let>FromClipBoard=k_%a%
Writeln>c:\txtfile.txt,result,%FromClipBoard%
Goto>Loop
Hope this helps,
Dick
Recently discussed this topic here:
http://www.mjtnet.com/usergroup/viewtopic.php?t=2067
Basically, in certain circumstances using Macro Scheduler, you need to pass the arrayed value to a more static variable before you can use it. I don't know any hard and fast rules for determining those "certain circumstances" but this is one of them. Typically I create the second variable any time I use an array. Prevents hair pulling.
Try something like:
Let>a=0
Label>Loop
Let>a=a+1
GetClipBoard>k_%a%
Let>FromClipBoard=k_%a%
Writeln>c:\txtfile.txt,result,%FromClipBoard%
Goto>Loop
Hope this helps,
Dick
Don't know.... but its a pretty simple fix. Only one line. When solutions are that easy I don't usually waste much energy looking for alternatives.is there another way around it?
Again, Don't know... bug vs feature must be one of the oldest arguments in software development. If you think its a bug, put it into the bug tracker and see what comes of it. It seems to me that your original script should work with the arrayed variable. But there might be a good reason for it to work the way it does.is this considered a bug in the program?
Wish I had a better answer for you. Perhaps someone else can shed some light on the subject?
Later,
Dick
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact: