Jump to content

Mark-

Members
  • Content Count

    208
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Mark-


  1. Hello,

     

    We use TMS Scripter (Pascal) to allow our customers to execute custom logic on data. Embedded editor, breakpoints, stepping, variable watches, etc. are included.

     

    Looking at providing Python and how to provide the same features.

     

    PyScripter seems to provide all or part but, I do not see any path to embed PyScripter in our application.

     

    How do you guys, using Python4Delphi, provide an IDE?

     

    Thanks,

    Mark

     


  2. type
     TMyFunkyRecord = record
      b:boolean;
     end;
    
    function Something(inB:pointer):pointer;
    var
     bRec:TMyFunkyRecord;
    begin
     bRec:=TMyFunkyRecord(inB^);
     if bRec.b then
      beep;
     bRec.b:=false;
     result:=@bRec;
    end;
    
    var
     bRec,aRec:TMyFunkyRecord;
    begin
     bRec.b:=true;
     aRec:=TMyFunkyRecord(Something(@bRec)^);
     if not aRec.b then
      beep;
    end;

    You can make it work with "naked" pointers. More trouble than worth to avoid declaring the pointer type. My2c.


  3. 5 minutes ago, Der schöne Günther said:

    I assume "I get an OS error" means "CreateProcess(..) returns false and GetLastError() will then return ERROR_ELEVATION_REQUIRED". Is that correct?

    That is correct.

     

    I have used and use ShellExecute in other code and will give it a try.

     

    Thanks,

     

    Mark


  4. Hello,

     

    Using CreateProcess I am attempting to launch another program of mine.

    If the "Run this program as administrator", is enabled in the compatibility" tab. all works as expected. If not enabled, I get an OS error: "The requested operation requires elevation". Perhaps the manifest is in error.

     

    This is the manifest I am using:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
      <assemblyIdentity type="win32" name="Configure" version="1.0.0.0" processorArchitecture="x86"/>
      <dependency>
        <dependentAssembly>
          <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            publicKeyToken="6595b64144ccf1df"
            language="*"
            processorArchitecture="*"/>
        </dependentAssembly>
      </dependency>
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
          <requestedPrivileges>
            <requestedExecutionLevel
              level="requireAdministrator"
              uiAccess="false"/>
          </requestedPrivileges>
        </security>
      </trustInfo>
      <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
        <application>
          <!--Windows 7-->
          <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
          <!--Windows 8 and Windows Server 2012-->
          <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
          <!--Windows 8.1 and Windows Server 2012 R2-->
          <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
          <!--Windows 10, Windows Server 2016 and Windows Server 2019-->
          <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
        </application>
      </compatibility>
    </assembly>

     

    Any ideas?

     

    Thanks,

     

    Mark

     


  5. 48 minutes ago, emailx45 said:

    hi @Mark-

     

    NOTE2: if possible avoid use "TPainBox" because it stay sending/receiving message to Windows repaint the region...

     

    It's just to show the code to process the text and alignments, the important part.😉

     

    Your code does not support word wrap or embedded line feeds. It was/is a requirement and stated in the first post.

     

    Thanks for playing.

     


  6. 2 hours ago, emailx45 said:

    ??? my fault...

     

    While I am not sure what you are asking, the screen capture, red, looks correct, I will answer: Yes, run the project included in the zip.


  7. Hello,

     

    I have a need to align some text in a rectangle to the traditional nine locations. The user decides how to align each cell and I wanted to make one call, passing in the vertical and horizontal alignment selections. The text needs to wordbreak and may contain linefeeds.

     

    Searching the web, no joy, so I created this test project. Perhaps someone knows a better solution, and will share, and/or this will help another.

     

    Cheers,

     

    Mark

    TextAlign.zip


  8. 21 minutes ago, Fr0sT.Brutal said:

    In my case it was my personal smartphone with thousands of SMS's stored so "Read all" would likely die in agony 🙂

    Yeah we did lots of testing and used the "read all" because we have total control of the device, it is only used for our SMS access, but could have used other commands to read the messages. All our messages are text only and the connection is serial, the data flow rate is not so high as to be an issue.


  9. 3 hours ago, Fr0sT.Brutal said:

    I didn't found a way to read messages from PC so I configured a task scripter on phone to catch messages and write them to a file which is accessible from PC

    We only found one phone, Nokia C2-01 was the test phone, that did not support reading messages.  It might apply to all Nokia phones.

    We have not had any customers with phones/modems unable to be used.

     

    Set the message area AT+CPMS

    Read all the messages AT+CMGL="ALL"

    Delete all messages AT+CMGD=0,4'


  10. Yes one of our apps sends/receives SMS.

    Sometimes, when the phone USB port is plugged into the computer the phone installs a driver for the USB port and it appears as a MODEM.

    Other times, e.g. some Samsung phones, you install the driver from Samsung.

    And other times a cell modem is used.

    After the phone/modem is plugged in you can see if it appears as a modem in the device manager.

    Now that you have a modem you use AT commands to send/receive messages.

    Not all phones/modems implement SMS send/receive the same. I have never seen a "standard".

    You can find data on the AT commands on the web.

     

×