05-16-2008, 01:42 PM
Here is the main macro
Here is the new function it calls
I get unidentified errors on r, c, Passord etc...
I understand that these variables are local and therefor not seen in the new function.
Should I make them global in the primary macro:
or -
or --
I'm reluctant to make them global because they might affect other functions or macros.
str Valgt_funksjon
str tid=tid.time("dddd 'kl.'" "h:mm") ;; Dag og tid
str Passord="[**]"
str VNC_Viewer_PC_Config_Fil
str Oppgave
str Valgte_PCer
str Desktop_Path.expandpath("$Desktop$\") ;; Expands the desktop path for any user and places it in variable "Desktop_path"
int r
str c
;Run_function_on_other_PCer
foreach c Valgte_PCer
,mac "Send_Function_Til_PC_Run" "" c
,,;r=(NetSendMacro(c Passord Valgt_funksjon))
,,;if(r) mes "Kan ikke sende function til denne PC" c
,,;r=(net(c Passord Valgt_funksjon))
,,;if(r) mes "Kan ikke kjøre function på denne PC" c
goto Slutt
Here is the new function it calls
r=(NetSendMacro(c Passord Valgt_funksjon))
if(r) mes "Kan ikke sende function til denne PC" c
r=(net(c Passord Valgt_funksjon))
if(r) mes "Kan ikke kjøre function på denne PC" c
I get unidentified errors on r, c, Passord etc...
I understand that these variables are local and therefor not seen in the new function.
Should I make them global in the primary macro:
or -
or --
I'm reluctant to make them global because they might affect other functions or macros.