1 Attachment(s)
	
	
		Assigning a variable based off app's current state
	
	
		Enabled is set to True in the Object Repository.  When the script gets to var = VbWindow("frmSubMaint").VbButton("Delete").GetROProperty("Enabled") .. The script crashes and says it cannot identify the Object "Delete" (Please see attachment).
Any suggestions?
VbWindow("frmSubMaint").Activate
	var = VbWindow("frmSubMaint").VbButton("Delete").GetTOProperty("Enabled")
	
		Do until var = False
				VbWindow("frmSubMaint").VbButton("Delete").Click
				VbWindow("frmSubMaint").Dialog("Delete Routine").WinButton("Yes").Click
				Wait 65
					var = VbWindow("frmSubMaint").VbButton("Delete").GetROProperty("Enabled")
		Loop
	
VbWindow("frmSubMaint").VbButton("Add").Click
	VbWindow("frmSubMaint").ActiveX("SSTab").VbEdit("txtTab1Field(4)").Set "TESTING"
	VbWindow("frmSubMaint").ActiveX("SSTab").VbEdit("txtTab1Field(10)").Type "24637"
	VbWindow("frmSubMaint").VbWindow("frmLookUp").VbList("lstCodes").Select "PAINT LICK"
	VbWindow("frmSubMaint").VbWindow("frmLookUp").VbList("lstCodes").Activate "PAINT LICK"
VbWindow("frmSubMaint").VbButton("Save").Click
	 
	
	
	
		Re: Assigning a variable based off app's current state
	
	
		Does it crash in the loop or before the loop starts?
VbWindow("frmSubMaint").Activate
var = VbWindow("frmSubMaint").VbButton("Delete").GetTOProperty("Enabled") [SIZE="1"][I][B](here?)[/B][/I][/SIZE]
Do until var = False
VbWindow("frmSubMaint").VbButton("Delete").Click
VbWindow("frmSubMaint").Dialog("Delete Routine").WinButton("Yes").Click
Wait 65
var = VbWindow("frmSubMaint").VbButton("Delete").GetROProperty("Enabled") [SIZE="1"][I][B](or here?)[/B][/I][/SIZE]