File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -4,20 +4,24 @@ var $ptrLabel; $ptrURL : Pointer
44var $_URLs : Collection
55var $range1 ; $range2 : Object
66var $start ; $end : Integer
7+ var $label ; $URL : Text // ACI0105031
78
89$ptrLabel := OBJECT Get pointer:C1124 (Object named:K67:5 ; "URLlabel" )
910$ptrURL := OBJECT Get pointer:C1124 (Object named:K67:5 ; "URLurl" )
1011
1112If (Not:C34 ((Is nil pointer:C315 ($ptrLabel )) | (Is nil pointer:C315 ($ptrURL ))))
1213
14+ $label := $ptrLabel - > // ACI0105031
15+ $URL := $ptrURL - > // ACI0105031
16+
1317 $_URLs := WP Get links:C1643 (Form:C1466 .selection )
1418 If ($_URLs .length > 0)
1519
1620
1721 // text currenttly selected in the area
1822 $range1 := Form:C1466 .selection
1923
20- If (($ptrURL - > ) # "")
24+ If ($URL # "") // ACI0105031
2125
2226 // range of the first URL
2327 $range2 := WP Text range:C1341 (Form:C1466 .selection .owner ; $_URLs [0 ].range .start ; $_URLs [0 ].range .end )
@@ -43,7 +47,16 @@ If (Not:C34((Is nil pointer:C315($ptrLabel)) | (Is nil pointer:C315($ptrURL))))
4347
4448 End if
4549
46- WP SET ATTRIBUTES:C1342 ($range1 ; wk link url:K81:202 ; $ptrURL - > )
47- WP SET TEXT:C1574 ($range1 ; $ptrLabel - > ; wk replace:K81:177 )
50+ // user friendly help // ACI0105031
51+ If ($URL= "www@")
52+ $URL := "http://" + $URL
53+ End if
54+
55+ Try // ACI0105031
56+ WP SET TEXT:C1574 ($range1 ; $label ; wk replace:K81:177 ) // ACI0105031 (two lines of code switched… the label must be set FIRST)
57+ WP SET ATTRIBUTES:C1342 ($range1 ; wk link url:K81:202 ; $URL ) // ACI0105031 (two lines of code switched… the label must be set FIRST)
58+ // Catch
59+ // ALERT("An error occured while setting the URL") // to be translated
60+ End try
4861
4962End if
You can’t perform that action at this time.
0 commit comments