pprotcmd | 3 Jul 2008 09:24
Picon
Favicon

Calling function from bar button

I create a simple bar with two buttons: one button calls user function SomeFunc (without parameters)
defined in the same file, another button just displays a debug message. SomeFunc displays another debug
message and closes the bar.
Code:

//file test.powerpro
local C = cl.Create("Simple", 1)
C.Insert(0)
C.SetLabel(0, "Function")
C.AddLeft(0, ".test <at> SomeFunc")

C.Insert(0)
C.SetLabel(0, "Command")
C.AddLeft(0, "win.debug(?=Command=)")

C.AddProperties("Format=Vertical")

*Bar Show Simple
quit

Function SomeFunc
win.debug("SomeFunc")
*Bar Close Simple
quit
//end of test.powerpro

Excerpt from the help file:
FName()     //Call a function within the same script file with no arguments
I tried all the combinations of

(Continue reading)

brucexs | 3 Jul 2008 13:10
Picon
Favicon

Re: Calling function from bar button

> Function SomeFunc()
> 
> No combination works. Although the code above successfully calls the 
function.
> 
> Why should I indicate the script name if the function is in the same 
file? What is the simplest and correct code? What is my mistake?
>

PowerPro interprets "being in the same file" at the time that the 
command is executed.  In your case, when the command is executed, it is 
part of a button configuration.  Commands run from buttons are not 
considered part of any file, so the full path to functions must always 
be specified.

PowerPro does not see the fact that this button's function call command 
was originally added by a script command from a file when it runs the 
command.

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

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:
(Continue reading)

dleidinger | 6 Jul 2008 16:03
Picon
Favicon

cl.GetLeftMoreCmd missing ?

I would like to determine the contents of the more-command-box of an 
commandlist-item. In the help-file i can find:
 cl.GetLeftCmd(clname, clitem, i)
 cl.GetLeftCmd("mybar", 13, 1)
 cl.GetLeftParam(clname, clitem, i)
 cl.GetLeftWork(clname, clitem, i)
 cl.GetLeftHow(clname, clitem, i)
 cl.GetLeftOnTop(clname, clitem)
 cl.GetLeftSwitchTo(clname, clitem)

But i can't find something like cl.GetLeftMorecmd 

Best regards Detlef

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

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:power-pro-digest@... 
(Continue reading)

brucexs | 6 Jul 2008 16:54
Picon
Favicon

Re: cl.GetLeftMoreCmd missing ?

--- In power-pro@..., "dleidinger" <dleidinger <at> ...> wrote:
>
> I would like to determine the contents of the more-command-box of an 
> commandlist-item. In the help-file i can find:
>  cl.GetLeftCmd(clname, clitem, i)

From the help:

"cl.GetLeftCmd(clname, clitem, i)  or  hitem.GetLeftCmd(i)
Returns the ith command name from the Left Command of the specified 
command list. Returns the first command if i is 0 or 1, the second if 
it is two, and so on. You use cl.GetRightCmd for the Right command and 
cl.GetMiddleCmd for the middle command. "

Use a loop to sequence through all the commands 1... until 
cl.getleftcmd returns "".

It does not distinguish "more commands"; it just returns the commands 
one by one.  After all, the more commands could contain more than one 
command.

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

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
(Continue reading)

brucexs | 6 Jul 2008 16:56
Picon
Favicon

Re: cl.GetLeftMoreCmd missing ?

> Use a loop to sequence through all the commands 1... until 
> cl.getleftcmd returns "".
> 
> It does not distinguish "more commands"; it just returns the commands 
> one by one.  After all, the more commands could contain more than one 
> command.
>

So

Do(hitem.getleftcmd(2), hitem.getleftparam(2), cl.getleftwork(2),"")

should run 2nd command with its parameters and work.

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

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:power-pro-digest@... 
(Continue reading)

Detlef Leidinger | 6 Jul 2008 17:04
Picon
Favicon

Re: Re: cl.GetLeftMoreCmd missing ?

Hi Bruce,

thanks Bruce, will try it out

Best regards Detlef

Am 06.07.2008, 16:56 Uhr, schrieb brucexs <bswitzer@...>:

>> Use a loop to sequence through all the commands 1... until
>> cl.getleftcmd returns "".
>>
>> It does not distinguish "more commands"; it just returns the commands
>> one by one.  After all, the more commands could contain more than one
>> command.
>>
>
>
> So
>
> Do(hitem.getleftcmd(2), hitem.getleftparam(2), cl.getleftwork(2),"")
> should run 2nd command with its parameters and work.
>
>

		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

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

(Continue reading)

Sheri | 8 Jul 2008 06:27
Picon

regexDialog problem with Dialog 1.15/1.16

At Line 457 of regexDialog.powerpro included with dialog plugin:

st_hDlg.show("ebFmt", sHide).enable(bEnable)
st_hDlg.show("stFormat", sHide).enable(bEnable)

Has to be changed to:

st_hDlg.show("ebFmt", sHide)
st_hDlg.enable("ebFmt",bEnable)
st_hDlg.show("stFormat", sHide)
st_hDlg.enable("stFormat", bEnable)

Otherwise cannot use the radio selection buttons without this error:

---------------------------
PowerPro
---------------------------
ERROR: dialog.enable: Control number wrong

Error occurred near line 457 of script regexDialog <at> setControlProperties:
st_hDlg.show("ebFmt", sHide).enable(bEnable)

Called from line 432 of script regexDialog <at> radButSel

Press Cancel to end all running scripts.
---------------------------
OK   Cancel   
---------------------------

------------------------------------
(Continue reading)

power | 8 Jul 2008 18:38
Picon

New file uploaded to power-pro


Hello,

This email message is a notification to let you know that
a file has been uploaded to the Files area of the power-pro 
group.

  File        : /Plug-ins_and_add-ons/dialogplugin1.17.zip 
  Uploaded by : entropyreduction
<alancampbelllists+yahoo@...> 
  Description : create and run dialogs; with dialog editorish thing; also get and set properties of controls
in any dialog  

You can access this file at the URL:
http://groups.yahoo.com/group/power-pro/files/Plug-ins_and_add-ons/dialogplugin1.17.zip 

To learn more about file sharing for your group, please visit:
http://help.yahoo.com/l/us/yahoo/groups/original/members/web/index.htmlfiles

Regards,

entropyreduction <alancampbelllists+yahoo@...>

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

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/

(Continue reading)

entropyreduction | 8 Jul 2008 18:41

dialog plugin 1.17

-- fixed error in show service: when applied to a control, didn't
return the control's handle (it returned the dialog's handle instead).

-- clarified behaviour when you call a service that returns a
<handle_to_control> with multiple control ids; service will return the
handle of the first control id encountered.

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

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:power-pro-digest@... 
    mailto:power-pro-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    power-pro-unsubscribe@...

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

entropyreduction | 8 Jul 2008 18:41

Re: regexDialog problem with Dialog 1.15/1.16

--- In power-pro@..., "Sheri" <sherip99 <at> ...> wrote:
>
> At Line 457 of regexDialog.powerpro included with dialog plugin:
> 
> st_hDlg.show("ebFmt", sHide).enable(bEnable)
> st_hDlg.show("stFormat", sHide).enable(bEnable)

> Otherwise cannot use the radio selection buttons without this error:

try dialog plugin 1.17, just uploaded

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

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:power-pro-digest@... 
    mailto:power-pro-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
(Continue reading)


Gmane