Possible to increase number of "%1"?

  • I need an action to increase the value of "%1" to submit a path to a file. Something like this (error is in red):

    <action name="rotate">
    set(i,1);
    create_plugin(photos/img1.jpg, photos/img2.jpg, photos/img3.jpg, photos/img4.jpg);
    inc(i,1);
    </action>

    <action name="create_plugin">
    addplugin(image);
    set(plugin[image].url, %get(i));
    ...
    </action>


    I can´t find out how to get the image-rotation to work. If I use "%1" for the url it works fine, but the next time the action will be called I need it to be "%2", then "%3" and so on....

    Thanks a lot!
    Nupsi

  • Try to modify your function like this:

    Code
    <action name="rotate">set(i,1);
    create_plugin(txtadd(photos/img, i, .jpg));
    inc(i,1);
    
    
    <action name="create_plugin">
    addplugin(image);
    set(plugin[image].url, %1);
    </action>

    In this case you pass only one parameter, so you will need to use only %1

    Hope this helps,
    Myksa

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!