The nearest thing that I can make to simulate a toggle action, with the George script language, is the following script code:
Code: Select all
//Toggle button simulaton.
//One touch on the button launch the script.
//First we go to the previous frame.
//Second wait until the pen touch the screen again.
//Third, we return to the first frame.
tv_LayerGetImage //get the current frame number
parse result currentimagen
imagen=currentimagen-1 //go to the previous frame
tv_LayerImage imagen
DO // this is repeated until you press the LMB
tv_WaitButton
parse result action x //wait until a mouse button is pressed
UNTIL (cmp(action,1)==1) //if it is a LMB the cicle is finished
tv_LayerImage currentimagen //we return to the first frame
The action of go to the previous frame and return to the first frame is achieved with two clicks ( so it is not exactly a toggle action) but I think that is usefull.
First we touch the asigned botton in the toolbar and the script is launched returning to the previous frame.
Second we tounch again in any point of the screen and we return to the original current frame. So whe can do the second click in an area of the frame that we want to take as reference.
With an ITUOS 4 you can use the touch ring to flip back and foward the frames but you must use the two hands. With the above scrip only a hand is necessary. I think it is fast and usefull.