-
Notifications
You must be signed in to change notification settings - Fork 1
/
arraycopy.uurx
92 lines (61 loc) · 3.33 KB
/
arraycopy.uurx
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*------------------------UltraDesign array copy in ARexx---------------------*/
/*
Make a rectangular array copy of the items currently in the clipboard
in UltraDesign. User is prompted for parameters on the dialog
window. Row and column spacing are specified in the currently
selected linear units.
*/
/*-----------------------------Setup section----------------------------------*/
options /* Turn off all arexx options */
'$$INTERN_UNIT = 0' /* Set to default units */
/*-------------------------Prompt for column information----------------------*/
options prompt " Enter columns (X)? " /* Set prompt */
parse pull xnum /* Get columns from user */
/* xnum now contains the number columns (x) */
options prompt "Enter column spacing? " /* Set prompt */
parse pull xspace /* Get spaces in user unit */
/* xspace now contains the column spacing in the default units */
/*-------Convert column spacing from default units to internal units (mm)-----*/
'$$TEST_LINEAR = ' xspace /* set test to spacing */
'$$INTERN_UNIT = 1' /* Switch to internal units */
options results /* Turn on results */
'RESULT $$TEST_LINEAR' /* Request test be returned */
parse var result type xspace /* Get spacing back */
options /* Turn options back off */
/* xspace now contains the column spacing in internal units (mm) */
/*-------------------------Prompt for row information-------------------------*/
options prompt " Enter rows (Y)? " /* Set prompt */
parse pull ynum /* Get rows from user */
/* ynum now contains the number of rows (y) */
options prompt " Enter rows spacing? " /* Set prompt */
parse pull yspace /* Get spacing from user */
options /* Turn options off */
/* yspace now contains row spacing in default units */
/*--------Convert row spacing from default units to internal units------------*/
'$$INTERN_UNIT = 0' /* Switch to default units */
'$$TEST_LINEAR = ' yspace /* Set test to row spacing */
'$$INTERN_UNIT = 1' /* Switch to internal units */
options results /* Turn on results */
'RESULT $$TEST_LINEAR' /* Request test be returned */
parse var result type xspace /* Get spacing back */
options /* Turn off options */
/* yspace now has row spacing in internal units (mm) */
/*----------Get mouse click from user (in internal units) for handle----------*/
say "Click on the left lower corner" /* Prompt user for handle */
options result /* Turn results on */
'RESULT @' /* Request mouse click */
parse var result type xmouse ',' ymouse /* Retrieve coordinates */
options /* Turn options off */
/* xmouse and ymouse now have the click point in internal units */
/*----------------Array Clone the items in the clipboard----------------------*/
'CLIP/CLONE/FROM=' xmouse ',' ymouse /* Set the handle point */
xpos = xmouse /* X coord of first column */
do xloop = 1 to xnum /* Loop column to column */
ypos = ymouse /* Y coord of first row */
do yloop = 1 to ynum /* Loop row to row */
'CLIP/CLONE/TO=' xpos ',' ypos /* Clone off given row,col */
ypos = ypos + yspace /* increment to next row */
end /* end of row loop */
xpos = xpos + xspace /* increment to next column */
end /* end of column loop */
/* End of arraycopy.uurx */