A checkbox test gone wrong

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
jj45410
Junior Coder
Posts: 38
Joined: Tue Nov 18, 2008 8:14 pm

A checkbox test gone wrong

Post by jj45410 » Mon Dec 01, 2008 9:20 am

Code: Select all

 Dialog>MyDialog
  Caption=DirectioryBomb
  Width=445
  Height=279
  top=CENTER
  left=CENTER
  Button=run macro,184,198,98,20,3
  Button=exit macro,184,146,97,20,2
  Checkbox=msCheckbox1,boom,24,56,97,False
  Checkbox=msCheckbox2,bam,24,80,97,False
EndDialog>MyDialog

Label>MainLoop
Show>MyDialog,result
   if>result=2,End
   if>result=3
if>boom.mscheckbox1=true,createboom
if>bam.mscheckbox2=true,createbam
endif
Goto>MainLoop

Label>End

SRT>createboom
CreateDir>BOOM
END>createboom

SRT>createbam
CreateDir>BAM
END>createbam
Well as some of you may know I am trying to get into move advanced scripting, well here is some of it..
This is a test to see if I could do a simple textbox menu well.. Kinda but if I try and tell it to create the directiory, nothing happens and debugging says it is fine...

Could someone please point out the error I have so obviously made, please. Thank you - jj45410

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

Post by Marcus Tettmar » Mon Dec 01, 2008 9:37 am

Corrected code:

Code: Select all

Dialog>MyDialog
  Caption=DirectioryBomb
  Width=445
  Height=279
  top=CENTER
  left=CENTER
  Button=run macro,184,198,98,20,3
  Button=exit macro,184,146,97,20,2
  Checkbox=msCheckbox1,boom,24,56,97,False
  Checkbox=msCheckbox2,bam,24,80,97,False
EndDialog>MyDialog

Label>MainLoop
   Show>MyDialog,result
   if>result=2,End
   if>result=3
     if>MyDialog.msCheckbox1=True,createboom
     if>MyDialog.msCheckbox2=True,createbam
   endif
Goto>MainLoop

Label>End

SRT>createboom
  CreateDir>BOOM
END>createboom

SRT>createbam
  CreateDir>BAM
END>createbam
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

jj45410
Junior Coder
Posts: 38
Joined: Tue Nov 18, 2008 8:14 pm

Post by jj45410 » Mon Dec 01, 2008 9:42 am

Thank you, Metettmar

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