I've created the bar with many checkboxes. Each one corresponds to an 
application with some document. After selecting some of checkboxes I 
press either Cancel or OK button. In the latter case the Apply function 
is executed. Code:

//start of script
//importing bar from ini file. OK button calls the Apply function

*Bar Show MyBar
quit

Function Apply
local i, Temp, Doc
static C = cl.Get("MyBar")
static Len = C.Length

for(i = 0; i < Len; i++)
    Temp = C.GetCtrlValue(i)
    if(not Temp)
        continue

    Temp = C.GetRightCmd(i)
    Doc = C.GetRightParam(i)

/*
Running commands with parameters. Assigned to right button for not to be 
executed immediately, but only after checking all checkboxes and pressing OK
*/

endfor

*Bar Close MyBar

quit
//end of script

The essence of my script implies that after pressing OK and thus calling 
the Apply function the bar isn't needed anymore. But if I just move the

*Bar Close MyBar

command before the execution loop (after the "static Len ..." command), 
then at checking some checkboxes and pressing OK the following message 
box appears:
__________________________________________________________
Error running command (5): Sharing/Network protection error
<application path> <document path>

Error occurred near line ...

Press Cancel to end ...
__________________________________________________________
Question is:
Why keeping the bar on the screen is necessary to run its commands?




------------------------------------

Attention: PowerPro's Web site has moved: http://www.ppro.orgYahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to