Graphics

 View Only
  • 1.  xpPublishedObject.SetPropertyString Cursor Setpoint

    Posted 09-26-2023 18:50

    Hello,

    I am using xpPublishedObject.SetPropertyString to insert a character into a static text field in the sequencer. The script appends a character to the end of whatever was in the text field to begin with. Whenever I run the script from the keyboard that inserts the character, it sets the cursor position back to the beginning of the line. Is there any way to make the cursor position stay, or to force the cursor to the end of the line instead? It's annoying to have to hit the end key every time the cursor resets.

    Thanks!



    ------------------------------
    Jack Reynolds
    ------------------------------


  • 2.  RE: xpPublishedObject.SetPropertyString Cursor Setpoint

    Posted 09-27-2023 16:15

    Can you provide your version, build and a sample script that has this problem? 




  • 3.  RE: xpPublishedObject.SetPropertyString Cursor Setpoint

    Posted 09-27-2023 16:34

    10.5 build 5543. 

    dim input as string
    dim obj as xpPublishedObject
    dim initial as string
    
    engine.Sequencer.GetFocusedPublishedObject(obj)
    obj.GetPropertyString(0, initial)
    
    input = InputBox("Enter the number of the character you want to insert." & VbCrLf & VbCrLf & "  1: +" & VbCrLf & "  2: Á" & VbCrLf & "  3: á" & VbCrLf & "  4: É" & VbCrLf & "  5: é" & VbCrLf & "  6: Í" & VbCrLf & "  7: í" & VbCrLf & "  8: Ó" & VbCrLf & "  9: ó" & VbCrLf & "10: Ú" & VbCrLf & "11: ú" & VbCrLf & "12: Ü" & VbCrLf & "13: ü" & VbCrLf &"14: Ñ" & VbCrLf & "15: ñ" & VbCrLf & "16: © (Copyright)" & VbCrLf & "17: • (Circle Bullet)" & VbCrLf & "18: ½ (One Half)" & VbCrLf & "19: ¼ (One Quarter)" & VbCrLf & "20: ⅓ (One Third)" & VbCrLf & "21: ⅔ (Two Thirds)","Insert Special Character","")
    
    if input = 1 then
    	obj.SetPropertyString(0, initial + "+")
    else if input = 2 then
    	obj.SetPropertyString(0, initial + "Á")
    else if input = 3 then
    	obj.SetPropertyString(0, initial + "á")
    else if input = 4 then
    	obj.SetPropertyString(0, initial + "É")
    else if input = 5 then
    	obj.SetPropertyString(0, initial + "é")
    else if input = 6 then
    	obj.SetPropertyString(0, initial + "Í")
    else if input = 7 then
    	obj.SetPropertyString(0, initial + "í")
    else if input = 8 then
    	obj.SetPropertyString(0, initial + "Ó")
    else if input = 9 then
    	obj.SetPropertyString(0, initial + "ó")
    else if input = 10 then
    	obj.SetPropertyString(0, initial + "Ú")
    else if input = 11 then
    	obj.SetPropertyString(0, initial + "ú")
    else if input = 12 then
    	obj.SetPropertyString(0, initial + "Ü")
    else if input = 13 then
    	obj.SetPropertyString(0, initial + "ü")
    else if input = 14 then
    	obj.SetPropertyString(0, initial + "Ñ")
    else if input = 15 then
    	obj.SetPropertyString(0, initial + "ñ")
    else if input = 16 then
    	obj.SetPropertyString(0, initial + "©")
    else if input = 17 then
    	obj.SetPropertyString(0, initial + "•")
    else if input = 18 then
    	obj.SetPropertyString(0, initial + "½")
    else if input = 19 then
    	obj.SetPropertyString(0, initial + "¼")
    else if input = 20 then
    	obj.SetPropertyString(0, initial + "⅓")
    else if input = 21 then
    	obj.SetPropertyString(0, initial + "⅔")
    else if input = "" then
    else
    	MsgBox("Invalid input.",0,"Insert Special Character")
    end if


    ------------------------------
    Jack Reynolds
    ------------------------------