Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to shorten or deactivate timeout delay when using "net"
#5
Here is the main macro

Code:
Copy      Help
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


Code:
Copy      Help
;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

Code:
Copy      Help
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:

Code:
Copy      Help
int+ r
str+ c

or -
or --

I'm reluctant to make them global because they might affect other functions or macros.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)