RetouchPRO

Go Back   RetouchPRO > Tools > Software > Photoshop Scripting

Notices

Photoshop Scripting Learning and sharing for all platforms

Reply
 
LinkBack Thread Tools
  #1  
Old 03-24-2005, 02:23 PM
Member
 
Join Date: Jul 2003
Posts: 44
can a script pick a random action?

Given a specific set of actions, is there any way to make a script randomly pick one of the actions and apply it to an image?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #2  
Old 03-24-2005, 03:43 PM
DannyRaphael's Avatar
Moderator
Patron
 
Join Date: Mar 2002
Location: Near Seattle, Washington, USA
Posts: 5,690
Quote:
Originally Posted by okplayer
Given a specific set of actions, is there any way to make a script randomly pick one of the actions and apply it to an image?
One way to do this would be as follows...

Suppose you had 10 candidate actions...
* The script would include commands to execute each of them, say, via a table of action names or individual "DoAction" commands
* Generate a random number 0-9 within the script
* Execute the corresponding action

Don't ask me how to "code this" , but functionally this would work. Ro and Rex are the resident coding experts.

HTH...

~Danny~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #3  
Old 03-31-2005, 02:34 PM
Member
 
Join Date: Aug 2004
Posts: 35
Random Acts of PS

Try something like:

var actions = [
"act1",
"act2",
"act3",
"act4",
/...
"actN",
];

var randomAction = actions[Math.floor(Math.random() * actions.length)];
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #4  
Old 03-31-2005, 03:23 PM
byRo's Avatar
Moderator
 
Join Date: May 2004
Location: Goiânia, Brazil
Posts: 1,549
Quote:
Originally Posted by DannyRaphael
Ro and Rex are the resident coding experts.
I think you can include xbytor in your list - seems like he's got it nailed

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #5  
Old 03-31-2005, 04:12 PM
Member
 
Join Date: Aug 2004
Posts: 35
Quote:
Originally Posted by byRo
I think you can include xbytor in your list - seems like he's got it nailed
Thanks. While this may be true, I am an infrequent visitor as opposed to 'resident'.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Actions skydog Software 9 03-29-2007 03:42 PM
Action or script to save 2 output files bouloss Photoshop Scripting 1 05-13-2006 10:51 PM
rules of third script or action? Lasse Photoshop Scripting 2 08-17-2005 09:38 PM
A gratitude post for a great action script RalphBenmurgia Photo-Based Art 3 02-20-2005 03:43 PM
Script or action for 50% guides Doug Nelson Photoshop Scripting 11 01-04-2005 11:56 PM


All times are GMT -6. The time now is 01:25 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 2008 Doug Nelson. All Rights Reserved




1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51