Code looks like this
Code: Select all
Input>test,Enter Filepath
IfDirExists>test
messagemodal>Filepath is correct
else
messagemodal>Filepath is invalid
endif
[/code]
Moderators: JRL, Dorian (MJT support)
Code: Select all
Input>test,Enter Filepath
IfDirExists>test
messagemodal>Filepath is correct
else
messagemodal>Filepath is invalid
endif
You can change the name if you really want to. Search Scripts and Tips and you'll find a technique. However, its much easier to use a dialog.How do I change the name?
When you do use an input and you want to close the program when there is no input, test teh variable for null condition then exit from the script. For example:is there a way to make that message not appear at all if im just closing it, say I opened it by accident.
Code: Select all
Dialog>Dialog1
//Make the caption what you want to see in the window title
Caption=Does Path\File exist?
Width=561
Height=130
Top=CENTER
Left=CENTER
Label= ,32,48
Edit=msEdit1,32,25,489,
Button=Check,237,76,75,25,3
Label=Path and file to be checked,32,8
EndDialog>Dialog1
Show>Dialog1
SRT>CheckFile
IfDirExists>dialog1.msedit1
Let>Dialog1.mslabel1=Filepath is correct
else
Let>Dialog1.mslabel1=Filepath is invalid
endif
ResetDialogAction>Dialog1
END>CheckFile
Label>Loop
GetDialogAction>Dialog1,res1
If>res1=2
Exit>
EndIf
If>res1=3
GoSub>CheckFile
EndIf
Wait>0.01
Goto>Loop
Code: Select all
Input>test,Enter Filepath
IfDirExists>test,True,False
Label>True
Message>Filepath is correct
Goto>End
Label>False
If>test=
goto>End
else
Message>Filepath is not correct.
Endif
Label>End