I would like to get a position of lets say a brush tool button inside photoshop. Is that possible with Photoshop scripting? Is it possible getting the value of a certain edit box (eg. brush size)?
Can it be done similar to this:
'PsJavaScriptExecutionMode Enums
Const psNeverShowDebugger = 1, psDebuggerOnError = 2, psBeforeRunning = 3
Dim appRef
Set appRef = CreateObject("Photoshop.Application")
Dim pos
pos = appRef.ControlPosition("paintbrushTool") //this is made up

You're asking two separate things:
The value of a certain edit box (eg. brush size)
The position of the Paint Brush tool itself. This is a UI question.
It's my understanding that for the first question, you're better off creating a brush present and scripting something to select that preset than you are trying to programmatically change the brush size, but I could be wrong.
This thread from the Adobe forums sounds relevant to what you're trying to accomplish, in regards to brushes and windows:
Unfortunately I don't think the original poster was satisfied with the answers.
You might be better off making your own panel than trying to script the existing brush panel, but I could be wrong.
According to an old JavaScript Tools Guide for Adobe CC I found there is a ScriptUIBrush object:
I hope this helps!