I have this script:
#Region
#AutoIt3Wrapper_UseUpx=n
#EndRegion
Global $SUPERBARPOS
$SUPERBARPOS = WinGetPos("[CLASS:Shell_TrayWnd]")
MsgBox(0, "Testing...", _
"Taskbar's attributes: x:" & $SUPERBARPOS[0] & _
" y:" & $SUPERBARPOS[1] & _
" w:" & $SUPERBARPOS[2] & _
" h:" & $SUPERBARPOS[3] & @CRLF & _
"Superbar condition: " & _taskbarHidden())
Func _taskbarHidden()
Local Const $ABM_GETSTATE = 4, $ABS_AUTOHIDE = 1, $ABS_ONTOP = 2
Local $ARETURN
$ARETURN = DllCall("shell32.dll", "uint", "SHAppBarMessage", "dword", $ABM_GETSTATE, "ptr*", 0)
If @error Then Return SetError(1, 0, 0)
If BITAND($ARETURN[0], $ABS_AUTOHIDE) Then
Return "Auto hide is enabled"
Else
Return "Auto hide is disabled"
EndIf
EndFunc
Func _getSuperbarPos2()
Local Const $ABM_GETTASKBARPOS = 5
Local Const $ABE_LEFT = 0
Local Const $ABE_TOP = 1
Local Const $ABE_RIGHT = 2
Local Const $ABE_BOTTOM = 3
Local $ARETURN
Global $_POSITIONS[4] = ["Left", "Top", "Right", "Bottom"]
Global $TAG_APPBARDATA = "LONG;HWND;INT;INT;STRUCT;INT;INT;INT;INT;ENDSTRUCT"
Local $PDATA = DllStructCreate($TAG_APPBARDATA)
DllStructSetData($PDATA, 1, DllStructGetSize($PDATA))
DllStructSetData($PDATA, 2, WinGetHandle("[CLASS:Shell_TrayWnd]", ""))
Local $ARESULT = DllCall("Shell32.dll", "BOOL", "SHAppBarMessage", "DWORD", $ABM_GETTASKBARPOS, "ptr", DllStructGetPtr($PDATA))
If @error Then Return SetError(@error, 0, -1)
If Not $ARESULT[0] Then Return SetError($ARESULT[0], 0, -2)
Return $_POSITIONS[DllStructGetData($PDATA, 4)]
EndFunc
Is there a way to convert it to Powershell, or if this isn't possible, how can I extract for example "&$SUPERBARPOS[1]&" using, again, powershell? More specific, I want to write a command in the powershell and see the outcome printed in powershell using that AutoIT script.