gryphon410 Posted August 31, 2016 Report Share Posted August 31, 2016 So, I swear I've done this before and swear I had this right yesterday, but it doesn't seem to be working. I want to prompt the user to to identify where buttons are on the web page. There will be 10 in a row and rather than identify 10 different variables, I want to use a variable with an array, use a repeat, and then increment the variable array by one each time but it isn't displaying the value of the variable. Here it is - <VARIABLE SET INTEGER Option="\x00" Destination="%N[1]%" Value="1"/> <REPEAT START Start="1" Step="1" Count="10" Save="TRUE" Variable="%ICTypeRepeatCounter%"/> <WAIT FOR KEY PRESS Key="A" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <GET MOUSE POSITION Option="\x00" X="%MousePosX[%N[1]%]%" Y="%MousePosY[%N[1]%]%"/> <MESSAGEBOX Caption="Mouse Coodinates" Message="%MousePosX[%N1]%]%, %MousePosY{%N1]%]%" Icon="0"/> <VARIABLE MODIFY INTEGER Option="\x00" Destination="%N[1]%" Value1="%N[1]%" Value2="1"/> <END REPEAT/> <DELAY Flags="\x02" Time="500"/> <MOUSE MOVE Option="\x01" X="%MousePosX[%N[1]%]%" Y="%MousePosY[%N[1]%]%" _PROMPT="0x000A"/> <DELAY Flags="\x02" Time="500"/> <MOUSE LEFT CLICK/> I've also attached a screenshot of the macro commands in the editor if that's easier for anyone. Basically when it gets to where it moves the mouse, it goes in the upper-left hand corner. When I do a message box to display what the Mouse Move Coordinates are, it appears as this - %MousePosX[%N1]%]%, %MousePosX[%N1]%]% What am I doing wrong? I swear I must just be missing something really simple here. -Doug Quote Link to comment Share on other sites More sharing options...
Cory Posted August 31, 2016 Report Share Posted August 31, 2016 First off you should put your code in a code block. You're missing the concept her on the repeat. Delete the first and sixth line. I have no clue what you're doing here. Now when you set the array values for X and Y use the counter variable specified in the repeat command instead of the N variable. EG %MousePosX[%N[1]%]% should be %MousePosX[%ICTypeRepeatCounter%]%. Later if you want to go though them and click or something you can use the same repeat. Quote Link to comment Share on other sites More sharing options...
gryphon410 Posted August 31, 2016 Author Report Share Posted August 31, 2016 (edited) Oh my word, you're so right. I don't know what I was doing either. I knew I just needed a second set of eyes. Ok, going to adjust and see if that will work. Yep, that worked! Thanks a ton! I think it was late and I was really tired when I was trying to use another unnecessary variable. Thanks for the help! Edited August 31, 2016 by gryphon410 Quote Link to comment Share on other sites More sharing options...
Cory Posted September 1, 2016 Report Share Posted September 1, 2016 No problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.