Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
change macro? (toolbar check button that controls a macro)
#2
This toolbar changes a global variable when you click the first button. The button is checked when the variable is 1, unchecked when 0.

Code:
Copy      Help
;/lock {int+ g_editorontop=0}
check :g_editorontop^1; SendMessage id(9999 TriggerWindow) TB_CHECKBUTTON 1 g_editorontop ;;^1 toggles the variable value between 0 and 1. In SendMessage, 1 is 0-based line index of the button in toolbar text.

Then use the variable in a macro. Example:

int hwnd=win("window name" "window class")
int+ g_editorontop
if(g_editorontop)
,ont hwnd
else
,clo hwnd


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)