Scripting Unity GUITexture as a button

So I am creating a game that is set for mobile and pc/mac. What i have is a GUITexture that when an object is clicked or touched it brings up the textures and then you can click on an action. on the mobile this is easily set up with the joystick script and touchpad feature. but i don’t want the scripting to have to be crazy different when deciding to port the game to mobile. So i trying to figure out how to get it so on the pc/mac that when you click on the GUITexture the object is performed. Any help here would be greatful.

void Update() {
    if(textureRect.Contains(Input.MousePosition)){
        if(Input.GetMouseButtonDown(0))
            DoThis();
    }
}

Texture rect being just that, the rect you used for your texture…

Thanks a lot, this realy helped me, but how can I find the rect used for the GUITexture ?
In the GUITexture parameters, there is only : Pixel Inset X, Y, width and height…
Thanks in advance