Change string to int [solved]

Hi all,

I want to change strings to integer. The strings are values from fvwm variables getting via Set $window_width = (GetOutput {echo $window_width} 1 -1) Set $time_date_height = (GetOutput {echo $timedate_height} 1 -1)to change the size of a widget:ChangeSize 1 $window_width $time_date_heightThis fails causeError: 2 (BadValue (integer parameter out of range for operation))In the fvwm-script help I found that “ChangeSize” needs integer for working. Is it possible to convert these strings which are string integers to real integers?

Thanks in advance,

Thomas

Btw. I have the same problem with ChangePosition …

Hi all,

after many tests the problem is fixed 8)

To change strings to integer the function “HexToNum” is needed:ChangeSize 1 (HexToNum (GetOutput {echo $(echo "obase=16; $[timedate_width]" | bc)} 1 -1)) (HexToNum (GetOutput {echo $(echo "obase=16; $[timedate_height]" | bc)} 1 -1)) Unfortunatelly the “integer string” is decimal. Therefore I take bc to convert the value into hex before sending to HexToNum.
Now all works well - ChangePosition, too. :smiley:

Regards,

Thomas