Change script after build

Is it possible to edit button script after build? For example, an input box next to a button (script for searching for file “X”) when I type in Y and press button, the script changes to look for Y instead of X.

I have this so far:

Dim f As FolderItem
f = GetFolderItem(“file:///\\XXX-XXX”, _
If f.Exists Then
MsgBox(“Not Found”)
End If

The way it works now. Press button either it finds it or it doesn’t.

I need to be able to have a textfield where user types in “101-YYY” and presses button for it to look for file:///\\101-YYY\ instead of file:///\\XXX-XXX\.

Why not just use GetOpenFolderItem instead?

The path needs to be changed, it can’t stay as a constant path but be able to be changed by user.

Did you read the link? GetOpenFolderItem presents the user an ‘Open file’ dialog to select a file.

You are using GetFolderItem which does not.

There is a lovely manual available to you in two different versions.
An online web version can be found at
and a PDF version can be found in the Documentation folder inside your Xojo install.

It goes over basic things like using variables.