loading

Add to this Thread


Steven Gentner from United States 2 years
Wongfeirang,

You need to read back in the array variable each time ... while I realize the arrays appear to keep their values the actual values in them is random. You should assume nothing is initialized each time the VBScript runs (unless you use the Sleep, WaitImage, etc. functions). Instead of your script, try the following:

XTarget = GetArrayVariable("XTarget")
YTarget = GetArrayVariable("YTarget")

if not isArray(XTarget) or ubound(XTarget) <20 then ReDim XTarget(20)
if not isArray(YTarget) or ubound(YTarget) <20 then ReDim YTarget(20)

Number = GetVariable("my_Number")

XTarget(Number) = GetFloatVariable("IMAGE_COUNT")
YTarget(Number) = GetFloatVariable("IMAGE_COUNT")+1
    
SetArrayVariable "XTarget", XTarget
SetArrayVariable "YTarget", YTarget

Number = Number + 1
if Number >= 20 then Number = 0

SetVariable "my_Number", Number

STeven.

Pick Avatar
* Question/Comment - Only <b>, <i>, <u> tags are allowed. All others will be escaped.
Use the tags [image1], [image2], etc. to place the images within your question/comment.
Upload Images (.jpg, .png, .gif) < 300K, robofiles (.robo) or Zip files (.zip) < 300K.

If you have any questions/issues about RoboRealm or image processing this is your chance to ask a question. Your question and any responses will be posted to the forum section of the website for others to read and learn from.

Note that any submission will be considered property of RoboRealm. If you do not wish your images to be displayed as part of the RoboRealm site please do not submit those images. Any submission may be removed from the website at the discretion of RoboRealm personnel.