Jump to content

softtouch

Members
  • Content Count

    181
  • Joined

  • Last visited

Everything posted by softtouch

  1. softtouch

    Freeing TPythonModule after using it takes long

    I stopped the time and it takes around 5 second until the .free returns. If I dont free it and just free the pythonengine, that will take 5 seconds (I guess for releasing the module). It definitely only take so long when the delphi function was called once from python, even the delphi function does not do anything. If I dont call the delphi function from python, there is no delay at all.
  2. A TEdgeBrowser is on a form and has a webpage loaded, and the devtools windows is open also. Is there any way to get a notification when the user right-click in the devtools window an element and select "copy->XPATH"? I need to close in that case the browser form and get the text from the clipboard to process is further.
  3. I have a python script which does some website work, and at one point in that script, it has to call a Delphi function with a byte array as parameter, and will have to get a string back from the Delphi function and continue the script execution. How can I realize that? I googled but its mostly the other way around, calling a python function from delphi.
  4. softtouch

    How to call a Delphi function from a python script?

    I know, I use P4D... I can call python funtions from delphi, but this time, I need it the other way around, calling a delphi function from python.
  5. I am playing for the first time a little with Python4Delphi. When I have a python function, for example: def Parser(src:str) -> str: s = "Test " + src return s How do I call this from Delphi? I have this script in a stringlist, and can call PythonEngine1.ExecStrings(sl); But how do I set the parameter "src" before calling the script, and how do I get the "s" value back after the call?
  6. Ok, that seems to work as expected. Thanks.
  7. softtouch

    Opensource scripting language?

    Does anybody know of any easy to learn opensource scripting language? I need to be able to send string to the scripting engine from Delphi, have it process the strings and return the result to Delphi. I also need to be able to load such scripts at runtime and execute them. Each of such script need to do different thing, based on some parameter, so I might need to load many different scripts at the same time.
  8. softtouch

    Opensource scripting language?

    Back to searching... LUA is not what I can use, it seems not to support UTF-8 for files.
  9. softtouch

    Opensource scripting language?

    But it was a good find 🙂 It works well so far. Thanks again.
  10. softtouch

    Opensource scripting language?

    Thanks for all the suggestions. I think I will go with lua as recommended by Lars Fosdal (thanks for that). I got most things running already and even it has no regex, gmatch and some other will do it.
  11. softtouch

    Opensource scripting language?

    Maybe I could use gmatch instead of regex, that might be ok. I am currently playing with lua, but could not yet figure out how to return a string to delphi.
  12. softtouch

    Opensource scripting language?

    Not sue lua is ok for my project. I saw it does not know anything about regex.
  13. softtouch

    Opensource scripting language?

    Python is too huge for just the small things I want to do, and I dont want to dig into python programming. I took a look at TJvInterpreterProgram, but its hard due to lack of documentation. It works, but I could not figure out how to use system functions like copy, delete etc. from within the code for the interpreter.
  14. softtouch

    Opensource scripting language?

    DWScript seems to be up to Delphi 11.x only, but I use Delphi 12.
  15. When I try to open getit in the tools menu, the IDE freeze and I need to use taskmanager to kill the process. When trying to go to my.embarcadero.com, I get a 504 error.
  16. I am trying to find, without success, information about how to catch when somebody click in a TEdgeBrowser into a form field, or on a table, or any other element. I can catch hyperlick clicks, but thats all so far. Is that even possible? What I need to do is, when a user click somewhere, to show the source code of that element.
  17. softtouch

    Clicking something in TEdgeBrowser

    Wow, cool, thanks a lot! I will play with it. So the window.addEventListener is the key to do what I want.
  18. softtouch

    Clicking something in TEdgeBrowser

    It might be in a memo, so I need just the text to process it further.
  19. softtouch

    Clicking something in TEdgeBrowser

    What I want is that the user load a website, and can click on any element/text/whatever on that page, and that the outerhtml will be displayed, no more, no less. Using the "inspect" is way to confusing for the user.
  20. I am looking for a edit/memo component which allows multiselect. For example, I have a text "This is just a test" in the edit/memo and would like to select "This" and "test". I tried to find such component, but without luck. Does it exist or is it just wishful thinking?
  21. softtouch

    Is there any edit/memo which allows multiselect?

    I believe I solved it using the TPlusMemo.
  22. softtouch

    Is there any edit/memo which allows multiselect?

    Just to show what I mean:
  23. softtouch

    Is there any edit/memo which allows multiselect?

    Thats a pity. I thought there is such control. Notepad++ can do that.
  24. softtouch

    Free profiler?

    Thanks, I tried that already, but was not able to have it measure the execution time of my procedures.
×