Page 1 of 1
Setting a filename
Posted: Sun Feb 24, 2008 11:12 am
by Andycal
I thought this would be easy:
Code: Select all
on openStack
set the filename of image "prevImage" of this stack to empty
set the filename of image "prevImage" of this stack to "C:/exports/test.jpg"
end openStack
But it doesn't work.
If I put "C:/exports/test.jpg" in the source of the 'basic properties' for the image, it displays it, but if I just run the above code, I get nothing.
The stack is being called from another stack by the way.
Posted: Sun Feb 24, 2008 11:58 am
by Klaus
Does it work if you add the card "descriptor" for the image?
Code: Select all
on openStack
set the filename of image "prevImage" OF CD 1 of this stack to empty
set the filename of image "prevImage" OF CD 1 of this stack to "C:/exports/test.jpg"
end openStack
Best
Klaus
Posted: Sun Feb 24, 2008 1:55 pm
by Andycal
Ahh, yep, that works. Doesn't work a second time, but works the first so I guess I need to tidy the file first or something.
Posted: Sun Feb 24, 2008 2:24 pm
by Klaus
Doesn't work a second time
What do you mean?
This does not work when you open that stack again/a second time?
Or do other (sub-)stacks NOT have their own "openstack" handler so they call this handler?
In that case there must of course exist an image "previmage" on cd 1 of the "calling" stack, since "THIS" will then refer to the calling stack!
Best
Klaus
Posted: Sun Feb 24, 2008 3:00 pm
by Andycal
I've got one stack with a button. This button does a screenshot export to a file, then opens the sub stack. The sub stack then gets the file and pops it in the image.
Works fine the first time, but if I go back to the first stack and press the button again, the image doesn't appear in the substack.
I'm guessing I'm not using my stacks right?
Posted: Sun Feb 24, 2008 3:08 pm
by Klaus
Code: Select all
Works fine the first time, but if I go back to the first stack and press the button again, the image doesn't appear in the substack.
Is the stack with the script already open at that time?
In that case the "openstack" handler will not get executed, since the stack is already open.
Regards
Klaus
Posted: Sun Feb 24, 2008 6:37 pm
by Andycal
Very good point!