why is this not working???

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Jmac2501
Pro Scripter
Posts: 76
Joined: Tue Nov 15, 2005 8:11 pm

why is this not working???

Post by Jmac2501 » Tue Jun 10, 2008 11:09 pm

I have written meny scrips like this and have no idea whats wrong with this one.

My problem its its not reconizing the checkboxs as being TRUE.

Code: Select all

Dialog>Dialog1
   Caption=Dialog1
   Width=189
   Height=307
   Top=348
   Left=276
   Label=What Would You Like To Add,16,8
   CheckBox=msCheckBox1,Ftest,32,40,97,True
   CheckBox=msCheckBox2,Cert,32,72,97,True
   CheckBox=msCheckBox3,Hipot,32,104,97,True
   CheckBox=msCheckBox4,ZDVT,32,136,97,True
   CheckBox=msCheckBox5,Inspect2,32,168,97,True
   CheckBox=msCheckBox6,Config,32,200,97,True
   Button=O.K.,16,232,65,25,2
   Button=EXIT,96,232,59,25,1
EndDialog>Dialog1


Label>MainLoop
  Show>Dialog1,result
  If>result=1,end
  If>result=2,1
Goto>MainLoop

label>1
wait>.5
If>%msCheckBox1%=TRUE
  send>FTEST OS
  press down
else
endif
If>%msCheckBox2%=TRUE
  send>CERT  OS
  press down
else
endif
If>%msCheckBox3%=TRUE
  send>HIPOT OS
  press down
else
endif
If>%msCheckBox4%=TRUE
  send>ZDRVT OS
  press down
else
endif
If>%msCheckBox5%=TRUE
  send>INSPF OS
  press down
else
endif
If>%msCheckBox6%=TRUE
  send>CONFIGOS
  press down
else
endif
Label>end

I have ran this in debug and everything but when it gets to the If>%msCheckBox#%=TRUE and it is TRUE it still goes to the else statment.

This is a simaler script and it works perfict.

Code: Select all

Dialog>Dialog1
   Caption=Dialog1
   Width=175
   Height=231
   Top=227
   Left=148
   Label=What do you want to verify?,8,16,true
   CheckBox=msCheckBox1,BUILD,40,40,97,True
   CheckBox=msCheckBox2,FTEST,40,64,97,True
   CheckBox=msCheckBox3,BURN-IN,40,88,97,True
   CheckBox=msCheckBox4,FLOAD,40,112,97,True
   CheckBox=msCheckBox5,TBD,40,136,97,False
   Button=O.K.,8,160,75,25,1
   Button=EXIT,88,160,75,25,2
EndDialog>Dialog1

Label>MainLoop
  Show>Dialog1,result
  If>result=2,end
  If>result=1,1
Goto>MainLoop

label>1
f>%msCheckBox1%=TRUE
    send>Build
else
endif
If>%msCheckBox2%=TRUE
	Send>FTEST
else
endif
If>%msCheckBox3%=TRUE
     Send>BI
else
endif
If>%msCheckBox4%=TRUE
    send>FLOAD
else
endif

label>end


Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Wed Jun 11, 2008 12:50 am

Are "True" and "TRUE" equal? I could be wrong but I suspect that if you write:

CheckBox=msCheckBox1,Ftest,32,40,97,True

then it should also be:

If>%msCheckBox1%=True

edauthier
Pro Scripter
Posts: 84
Joined: Sun Apr 13, 2003 1:26 pm
Location: USA

Post by edauthier » Wed Jun 11, 2008 1:56 am

Does it work without the [press downs] ?
I also like using SRT> instead..

Jmac2501
Pro Scripter
Posts: 76
Joined: Tue Nov 15, 2005 8:11 pm

Post by Jmac2501 » Wed Jun 11, 2008 2:14 am

I tried both way with TRUE and True.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Jun 11, 2008 4:59 am

You've missed out the dialog name. It should be:

If>Dialog1.msCheckBox1=True
..
..
etc
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts