"Overload" class execute method
You do this correctly like this:

import bpy

class MyButton(bpy.types.Operator):
    bl_idname = "object.my_button"
    bl_label = "My Button"
    flag = bpy.props.BoolProperty(default=True)

    def execute(self, context):
        if self.flag:
            print('Called by button')
        else:
            print('Not called by button')

 bpy.utils.register_class(MyButton)

 #usage:
 myBox.operator("object.my_button").flag = True
 bpy.ops.object.my_button(flag=False)