Morgan
14 years agoFrequent Contributor
Incrementing Values
I am trying to create a script that increments the variable number by 1 each time around and then appends it to the wndcaption and saves the region file to regions. So far, I have the script below which only seems to be resulting in regions with names of 2Dog, 2Bears, 2Cats... I want to see 1Dog, 2Bears, 3Cats.
I have the project variable set up as an integer with a default value of 1.
Sub Test
Set w = Sys.Desktop.ActiveWindow().Picture
Regions.AddPicture w, VarToStr(Project.Variables.Num +1) + VarToStr(Sys.Desktop.ActiveWindow.WndCaption)
End Sub
Thank you!
Morgan
I have the project variable set up as an integer with a default value of 1.
Sub Test
Set w = Sys.Desktop.ActiveWindow().Picture
Regions.AddPicture w, VarToStr(Project.Variables.Num +1) + VarToStr(Sys.Desktop.ActiveWindow.WndCaption)
End Sub
Thank you!
Morgan