Dialog ms label (True and False)

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
solo
Newbie
Posts: 6
Joined: Tue Jun 06, 2006 3:03 am

Dialog ms label (True and False)

Post by solo » Thu Jun 15, 2006 5:33 pm

Hello,
I have 1 more newbie question about a tool i made it removes specified reg keys and windows files. I know how to make it properly remove the files and keys i want removed however what i would like is a Label in the Dialog to appear after it runs to confirm either (Success) if the files and keys were found and removed properly or a (Failure) notice if the b4 mentioned files and keys either cant be found or removed.
tyvm in advance for any and all input below is a sample code.

Code: Select all

Dialog>Dialog1
   Caption=file n Reg tool 1.0
   Width=190
   Height=109
   Top=119
   Left=224
   Button=REmove,8,8,75,25,3
   Button=Exit,96,8,75,25,2
   
  
EndDialog>Dialog1

Label>MainLoop
show>Dialog1,result
if>result=3,edit
if>result=2,End
goto>MainLoop

SRT>edit
RegistryDelKey> ***(Path to Reg Key)***
DeleteFile>  ***(Path to file)***
END>edit

Label>End

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Jun 15, 2006 6:04 pm

Try something like this:

Code: Select all

Dialog>Dialog1
   Caption=file n Reg tool 1.0
   Width=190
   Height=109
   Top=260
   Left=362
   Label= ,16,40
   Button=REmove,8,8,75,25,3
   Button=Exit,96,8,75,25,2
EndDialog>Dialog1

Label>MainLoop
show>Dialog1,result
if>result=3,edit
if>result=2,End
goto>MainLoop

SRT>edit
RegistryDelKey> ***(Path to Reg Key)***
Wait>0.5
RegistryReadKey>***(Path to Reg Key)***,Entry,KeyResultVar
If>KeyResultVar=
  Let>Dialog1.msLabel0=RegKeyName is empty
  RDA>Dialog1
Else
  Let>Dialog1.msLabel0=RegKeyName value=%KeyResultVar%
  RDA>Dialog1
EndIf
DeleteFile>  ***(Path to file)***
Wait>0.5
IfFileExists>  ***(Path to file)***\Filename
  Let>Dialog1.msLabel0=File Filename Was not deleted
  RDA>Dialog1
Else
  Let>Dialog1.msLabel0=File Filename no longer exists
  RDA>Dialog1
EndIf
END>edit

solo
Newbie
Posts: 6
Joined: Tue Jun 06, 2006 3:03 am

Post by solo » Thu Jun 15, 2006 8:51 pm

Thank you for your responce I think this is putting me on the rite track i will have to try to tinker with it a bit more it gives you a the successfull
reading no matter what ......basicaly what this is used for is to remove unwanted registry entires and file dumps when i run one of a few programs a friend made this is much faster than going in and removeing them by hand....thx again for you looking at it and responding.

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