|
1. The actionMan.executeAction function needs 2 parameters , 1 an integer (0 i.e. zero), 1 a string ("number")
so, if you wrongly type:
actionMan.executeAction function “40472”
It will return “Wanted 2, got 1”, because you only gave it 1 rather than 2 parameters
So, the correct line with 2 parameters is:
actionMan.executeAction function 0 “40472”
2. If you call actionMan.executeAction from within a special function, then it can go where you want in the script:
example 1 (Invites you to pick 2 points, then opens window):
d = pickOffsetDistance prompt:"set a point” pt2Prompt:"set another point” snap:#3D—asks to pick 2 points on screen
winOpen 0 “40472” --calls function named winOpen takes an Integer and a String arguement to Open window
print d --print distance between the 2 points in window
function winOpen int str =
(
actionMan.executeAction int str --opens window
)
example 2 (opens window, then invites you to pick 2 points):
winOpen 0 “40472” --calls function named winOpen takes an Integer and a String arguement to Open window
d = pickOffsetDistance prompt:"set a point” pt2Prompt:"set another point” snap:#3D—asks to pick 2 points on screen
print d --print distance between the 2 points in window
function winOpen int str =
(
actionMan.executeAction int str --opens window
)
|