With this function you can get the current width (in pixels) of the game window.
window_get_width();
Real
ww = window_get_width();
The above code will store the current window width in the variable "ww".