Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pass variables to functions as arguments
#4
need to change some code
get text input from Function9 and pass to Function7 using mac command argument(1st arg)
Function Function9
Code:
Copy      Help
,case IDOK
,_s.getwintext(id(9 hDlg))
,mac "Function7" _s

pass command arg to macro8 using received _command variable
Function Function7
Code:
Copy      Help
,case 3
,if(but(lParam)) ;;checked
,,mac "Macro8" "" _command
,,_s="Stop"
,else ;;unchecked
,,shutdown -6 0 "Macro8"
,,_s="Start"
,_s.setwintext(lParam)


setup macro8 to receive arguments
Macro Macro8
Code:
Copy      Help
;;out text input from main
function str's
rep 
,0.2
,out s


Messages In This Thread
RE: Pass variables to functions as arguments - by Kevin - 05-26-2021, 02:28 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)