How to use the File Browser's (with ImportHelper) execute function? I now have the file browser, and I've found out how to load the texture into the node but not from the file browser. I have to type the file path in manually, and I had to put it in a different class that was activated with a bool... so, how can I activate the file browser instead?



code

import bpy
import os
from bpy.types import (Menu, PropertyGroup)
from bpy.props import (BoolProperty, FloatProperty, EnumProperty, StringProperty)
from bpy_extras.io_utils import ImportHelper

def update_texture(self, context):
    path = self.screen_texture.value
    img = bpy.data.images.load(filepath = path)

    nt = bpy.data.materials['Screen'].node_tree
    n = nt.nodes["screen_texture"].image = img

class IgnitProperties(bpy.types.PropertyGroup):

    screen_path = StringProperty(
       name="Browse Image:",
       description="Loads the texture for the screen",
       maxlen= 1024,
       subtype='FILE_PATH',
       update=update_texture
   )

class IdentifierFileSelector(bpy.types.Operator, ImportHelper):
    bl_label = "File Browser"
    bl_idname = "macbook_controller.identifier_file_selector"

    def execute(self, context):
        fdir = self.properties.filepath

        # Screen Texture


        return{'FINISHED'}

class IGLayoutDemoPanel(bpy.types.Panel):
    """Creates a Panel in the scene context of the properties editor"""
    bl_label = "MacBook Controller"
    bl_idname = "macbook_controller.macbook_controller"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout

        scene = context.scene

        # Screen Texture
        layout.label(text = "Screen Texture:")
        layout.prop(scene.ignit_panel, "screen_path", text="")
Use the ImportHelper - a class that wraps the FileBrowser. 

import os
from bpy_extras.io_utils import ImportHelper

class IdentifierFileSelector(bpy.types.Operator, ImportHelper):
    bl_idname = "something.identifier_file_selector"
    bl_label = "some folder"

    def execute(self, context):
        fdir = self.properties.filepath

        # do something with fdir here  (fullpath)

        return{'FINISHED'}


bl_idname


Should be lowercase. 
For your own sanity it's useful to make it consistent with the class name. If the class name is XxxxxxYyyyZzzzzz then a predictable  bl_idname would be "xxxxx_yyyyy_zzzz"
The prefix (i called it "something" in the code above) is a way for you to create a namespace for your own operators. Each operator is found in bpy.ops.* therefor your operator would be found at bpy.ops.something.identifier_file_selector




In this scenario, the StringProperty isn't something you want to be typing into ever. The update function is a little overkill then. See that property as visual reference to show you which file you picked.

class IgnitProperties(bpy.types.PropertyGroup):
    screen_path = StringProperty(description="Contains path to a texture")


class IdentifierFileSelector(bpy.types.Operator, ImportHelper):
    bl_label = "File Browser"
    bl_idname = "macbook_controller.identifier_file_selector"

    def execute(self, context):
        # Screen Texture
        img = bpy.data.images.load(filepath=self.properties.filepath)

        # update the node
        nt = bpy.data.materials['Screen'].node_tree
        n = nt.nodes["screen_texture"].image = img

        # also update this StringProperty so it reflects what you picked 
        context.scene.ignit_panel.screen_path = self.properties.filepath
        return{'FINISHED'}


your draw

scn = bpy.context.scene
row = layout.row()
row.prop(scn.ignit_panel, "screen_path")  # &lt;-- just for display purposes
row.operator("macbook_controller.identifier_file_selector", text="", icon='FILE')