@Override
    public void run() throws Exception {
		if (currentAddress == null) {
			println("NO CURRENT ADDRESS");
			return;
		}
		if (currentProgram == null) {
			println("NO CURRENT PROGRAM");
			return;
		}
        String search = askString("Text Search", "Enter search string: ");
        Address addr = find(search);
        if (addr != null) {
            println("Search match found at "+addr);
            goTo(addr);
        }
        else {
            println("No search matched found.");
        }
    }
@see ghidra.app.script.GhidraScript#run()
Ghidra/Features/Base/ghidra_scripts/FindTextScript.java