Ok, Almost done with my little project, need help

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

Ok, Almost done with my little project, need help

Post by jj45410 » Mon Dec 01, 2008 11:12 am

Code: Select all

Dialog>MyDialog
Caption=Jordans Tasks
   Width=455
   Height=279
   top=CENTER
   left=CENTER
   Button=Run Tasks,184,170,98,20,3
   Button=Exit Macro,184,146,97,20,2
   Checkbox=msCheckbox1,Del WoW Cache,24,140,97,false
   Checkbox=msCheckbox2,Start Disk Defrag,24,160,97,false
   Checkbox=msCheckbox3,Start Disk Clean,24,180,97,false
   Button=www.youtube.com,24,17,120,25,10
   Button=www.myspace.com,24,48,120,25,11
   Button=www.yahoo.com,24,80,120,25,12
   Button=www.mjtnet.com,24,112,120,25,13


EndDialog>MyDialog

Label>MainLoop
Show>MyDialog,result
If>res1=10
  Exe>http://www.youtube.com
EndIf
If>res1=11
  Exe>http://www.myspace.com
EndIf
If>res1=13
  Exe>http://www.yahoo.com
EndIf
If>res1=14
  Exe>http://www.mjtnet.com
Endif
if>result=2,End
if>result=3
if>MyDialog.msCheckbox1=True,Del WoW Cache
if>MyDialog.msCheckbox2=True,Start Disk Defrag
if>MyDialog.msCheckbox3=True,Start Disk Clean
endif
Goto>MainLoop

Label>End

SRT>Del WoW Cache
IfDirExists>C:\Program Files\World of Warcraft\Cache
del>C:\Program Files\World of Warcraft\Cache
else
MessageModal>Cache Does Not Exsist
endif
END>Del WoW Cache

SRT>Start Disk Defrag
ExecuteFile>C:\WINDOWS\system32\dfrg.msc,
END>Start Disk Defrag

SRT>Start Disk Clean
ExecuteFile>C:\WINDOWS\system32\cleanmgr.exe,
END>Start Disk Clean
Ok guys, Well what this will be is a startup menu for me with some of my regular tasks, Now All the Sub routines are Working Fine :) but its the websites that are not working, I took them from another script and inserted the buttons and made a few changes, they work fine on its normal script but not on this one.. Please Help :)
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 11:15 am

You are using "result" for the return variable in the Show command but you are looking at "res1" in your If statements. Change res1 to result.
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 11:18 am

Thank you once again, and thank you again for the quick reply.

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