Announcement

Collapse
No announcement yet.

RichText Redo

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RichText Redo

    Hello everyone and good health!

    Please tell me how to call the Redo function in Rich Text? When you press Ctrl+Y keys, it is worked out, but how to call it by pressing a separate button?

  • #2
    for this you can use SendKeys

    Comment


    • #3
      Click image for larger version

Name:	screen.PNG
Views:	385
Size:	23.4 KB
ID:	304982



      RichTextEx Object

      Comment


      • #4
        Originally posted by herrin View Post
        [ATTACH=CONFIG]n304982[/ATTACH]



        RichTextEx Object
        Thank you very much! What you need!!!)))

        Comment


        • #5
          I just can’t realize it through SendKeys ... I write:
          SendKeys = {}; SendKeysObject = luacom.CreateObject("WScript.Shell"); function SendKeys.Send(Keys) SendKeysObject:SendKeys(Keys); end SendKeys.Send("^y");

          Comment


          • #6

            Global Functions:

            Code:
            function SendKeys(sSendString)
                sSendString = "\"" ..sSendString.."\""
                result = DLL.CallFunction("AutoPlay\\Docs\\KEYSTROKES.DLL", "KEYSTROKE", sSendString, DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL)
            end

            On Click Button:

            Code:
            SendKeys("^y")

            required:
            KEYSTROKES.DLL

            credit:
            Worm

            Comment


            • #7
              Originally posted by herrin View Post
              Global Functions:

              Code:
              function SendKeys(sSendString)
              sSendString = "\"" ..sSendString.."\""
              result = DLL.CallFunction("AutoPlay\\Docs\\KEYSTROKES.DLL", "KEYSTROKE", sSendString, DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL)
              end

              On Click Button:

              Code:
              SendKeys("^y")

              required:
              KEYSTROKES.DLL

              credit:
              Worm
              Listen ... I may be doing something wrong, but I can’t do it ... I just haven’t tried it already. I understand correctly that "^ y" is Ctrl + Y? Do I need to somehow switch the focus to the RichText object itself or not? I basically just need to send a combination Ctrl+Y to the object. A program hangs with this library.

              Comment


              • #8
                Test


                Code:
                [ATTACH]n304988[/ATTACH]

                Comment


                • #9
                  Originally posted by herrin View Post
                  Test


                  Code:
                  [ATTACH]n304988[/ATTACH]
                  I figured out the problem. I just had a procedure with Application.Sleep(), which prevented the correct execution. Thanks!

                  Comment

                  Working...
                  X