Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Send changed variables to already running function without pausing macro? Solved
#9
try this for macro PlayerHelper

Macro PlayerHelper
Code:
Copy      Help
__RegisterHotKey hk1.Register(0 1 MOD_CONTROL|MOD_SHIFT 'X')
__RegisterHotKey hk2.Register(0 2 MOD_CONTROL|MOD_SHIFT 'Y')
__RegisterHotKey hk3.Register(0 3 MOD_CONTROL|MOD_SHIFT 'C')
__RegisterHotKey hk4.Register(0 4 MOD_CONTROL|MOD_SHIFT VK_F10)

;Kampfsperre
int x=0

;Zuschauverbot
int y=0

;Taktikmodus
int c=0
int hthread1 hthread2 hthread3
MSG z
rep
,if(GetMessage(&z 0 0 0)<1) break
,sel z.message
,,case WM_HOTKEY
,,sel z.wParam
,,,case 1
,,,,x = !x
,,,,out F"x={x}, y={y}, c={c}"
,,,,if (x)
,,,,,OnScreenDisplay "Kampfsperre" -1 20 100 "Arial" 20 0x00FFFF 8 "1"
,,,,,if(!hthread1)
,,,,,,hthread1=mac("CombatSettings" "" x 0 0)
,,,,else
,,,,,OsdHide "1"
,,,,,shutdown -6 0 "CombatSettings" hthread1
,,,,,hthread1 = !hthread1
,,,,
,,,case 2
,,,,y = !y
,,,,out F"x={x}, y={y}, c={c}"
,,,,if (y)
,,,,,OnScreenDisplay "Zuschauverbot" -1 20 140 "Arial" 20 0x00FFFF 8 "2"
,,,,,if(!hthread2)
,,,,,,hthread2=mac("CombatSettings" "" 0 y 0)
,,,,else
,,,,,OsdHide "2"
,,,,,shutdown -6 0 "CombatSettings" hthread2
,,,,,hthread2 = !hthread2
,,,case 3
,,,,c = !c
,,,,out F"x={x}, y={y}, c={c}"
,,,,if (c)
,,,,,OnScreenDisplay "Taktikmodus" -1 20 180 "Arial" 20 0x00FFFF 8 "3"
,,,,,if(!hthread3)
,,,,,,hthread3=mac("CombatSettings" "" 0 0 c)
,,,,else
,,,,,OsdHide "3"
,,,,,shutdown -6 0 "CombatSettings" hthread3
,,,,,hthread3 = !hthread3
,,,,
,,,case 4
,,,,OnScreenDisplay "END" 3 50 400 "Arial" 20 0x00FFFF
,,,,shutdown -6 0 "CombatSettings"
,,,,ret
,DispatchMessage &z


Messages In This Thread
RE: How to send changed variables to already running function without pausing macro? - by Kevin - 08-06-2020, 04:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)