Warning: This variable appears to never be assigned a value.
Specifically: local MoveWindow
031: }
033: {
▶ 034: MoveWindow(0, 0, (A_ScreenWidth * 0.5), A_ScreenHeight)
035: }
037: {
For more details, read the documentation for #Warn.
on the following code. Note: I have a lot more code but have commented it all out to try to figure this out. So the 1 key macro works and tells me the screen dimensions. Why would the MoveWindow fail with that error? I've dug around and can't find any reason...
Code: Select all
#SingleInstance Force
#Requires AutoHotkey >=2.0
/* Warn VarUnset, Off */
; variable declarations
global mon_count := 0
global mon_pri := 0
global arr_mon_top := []
global arr_mon_right := []
global arr_mon_bottom := []
global arr_mon_left := []
global win_count := 0
global arr_win_id := []
global arr_win_mon := []
global arr_win_x := []
global arr_win_y := []
global arr_win_width := []
global arr_win_height := []
global arr_win_xpct := []
global arr_win_ypct := []
global arr_win_widthpct := []
global arr_win_heightpct := []
global arr_win_minmax := []
; shortcodes
;Symbol Description
;# Win (Windows logo key).
;! Alt
;^ Control
;+ Shift
^!1:: msgbox A_ScreenHeight . " height " . A_ScreenWidth . " width "
^+4::
{
MoveWindow(0, 0, (A_ScreenWidth * 0.5), A_ScreenHeight)
}
^!5::
{
MoveWindow(Random(A_ScreenWidth * 0.02, A_ScreenWidth * 0.15), Random(A_ScreenWidth * 0.02, A_ScreenWidth * 0.3), (A_ScreenWidth * 0.5), (A_ScreenHeight * 0.5))
}