

limelect
Members-
Content Count
733 -
Joined
-
Last visited
-
Days Won
1
limelect last won the day on April 15 2022
limelect had the most liked content!
Community Reputation
46 ExcellentRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
I found this project https://github.com/jpalbert/webcam-settings-dialog-windows I changed the bat to chcp 65001 > nul ffmpeg -f dshow -show_video_device_dialog true -i video="Integrated Camera" and it works however, doing the same with Delphi does not work as I have GetDosOutput that does not do the job Any idea how to do this with Delphi? GetDosOutput works when I read info from a program I tried to delete the repeat section Any other Dos reading? procedure TForm1.GetDosOutput(CommandLine: string); const ReadBuffer = 32768; // 32kb buffer var SA: TSecurityAttributes; SI: TStartupInfo; PI: TProcessInformation; StdOutPipeRead, StdOutPipeWrite: THandle; WasOK: Boolean; Buffer: array[0..ReadBuffer] of AnsiChar; BytesRead: Cardinal; Handle: Boolean; Apprunning: DWord; // T: Ttime; TotalBytesRead, ExitCode: DWORD; BytesLeftThisMessage, TotalBytesAvail: integer; par_s: string; begin // Result := ''; Application.ProcessMessages; with SA do begin nLength := SizeOf(SA); bInheritHandle := True; lpSecurityDescriptor := nil; end; CreatePipe(StdOutPipeRead, StdOutPipeWrite, @SA, 0); try with SI do begin FillChar(SI, SizeOf(SI), 0); cb := SizeOf(SI); dwFlags := STARTF_USESHOWWINDOW or STARTF_USESTDHANDLES; wShowWindow := SW_HIDE; hStdInput := GetStdHandle(STD_INPUT_HANDLE); // StdOutPipeRead; don't redirect stdin hStdOutput := StdOutPipeWrite; hStdError := StdOutPipeWrite; end; try UniqueString(CommandLine); Handle := CreateProcess(nil, PChar(CommandLine), @SA, @SA, true, (CREATE_NEW_CONSOLE) or (REALTIME_PRIORITY_CLASS), // NORMAL_PRIORITY_CLASS, nil, // PChar(WorkDir), nil, sI, PI); except end; CloseHandle(StdOutPipeWrite); begin repeat Apprunning := WaitForSingleObject(PI.hProcess, 100); Application.ProcessMessages; until (Apprunning <> WAIT_TIMEOUT) { or (stop2)}; repeat if PeekNamedPipe(StdOutPipeRead, @Buffer[0], ReadBuffer, @BytesRead, @TotalBytesAvail, @BytesLeftThisMessage) then if BytesRead > 0 then begin // ReadFile(ReadPipe,Buffer[0], ReadBuffer,BytesRead,nil) ; WasOK := ReadFile(StdOutPipeRead, Buffer[0], BytesRead, BytesRead, nil); if BytesRead > 0 then begin Buffer[BytesRead] := #0; OemToAnsi(Buffer, Buffer); par_s := StrPas(Buffer); if par_s <> '' then Memo1.Lines.Add(par_s); end; end; until (BytesRead > 0) {or (stop2)}; // < ReadBuffer) ; end; finally // stop2 := false; CloseHandle(PI.hThread); CloseHandle(PI.hProcess); CloseHandle(StdOutPipeRead); // GoToFirstLine; end; end;
-
I just want to open webcam setting with Delphi window 7 just code plz
-
The programs are made with Delphi. But are for Python https://limelect.com/downloads/compile-ui-to-py-files/ https://limelect.com/downloads/python-2-execute/ Have fun
-
communicate between 2 progs with sendmessage.
limelect replied to JeanCremers's topic in Windows API
use https://torry.net/quicksearchd.php?String=WinPopup&page=1 mdMailSlot it did for me the job -
Prevent Multiple Instance from running at the same time
limelect replied to new_x's topic in Windows API
Use OgFirst from https://github.com/TurboPack/OnGuard-VCL in dpr if TogFirst.IsFirstInstance then begin -------------- end else TogFirst.ActivateFirstInstance; -
First, change the comma to point then use the cell function
-
I hope this will bring you closer to your need https://www.swissdelphicenter.ch/en/showcode.php?id=1302
-
D10.2.3 It Is Ok thanks
-
Thanks, I will wait for the final fix Thanks for the source
-
@FreeDelphiPascal I know the component very well and use it can you put here the fixed source?
-
Although it is not Delphi it is mad with Delphi. In one of my Delphi projects, I used Python and it did not have an execution so I made this application for me BUT it might help OTHERS Python 2 execute https://limelect.com/downloads/python-2-execute/ Good day
-
I am baffled. Now the bad is good. The original directory works.!!!!! If there is GOD he fixes things. And suddenly things work. what a field I chose. Thanks, everybody.
-
It seems that a window directory is the problem and Delphi does not help since this instruction FDConnection1.GetTableNames('', '', '', str, [osMy, osOther], [tkTable], false); return 0; The "bad" directory used to be the original directory
-
OK, guys good news and bad news. It is a window problem and Delphi Taking the bad program to a good location it works.
-
yes. It is a portable computer that goes with me everywhere. So it restarts for almost every few days. it is a Lenovo server very powerful. I started this program out of a need for a project. So it worked in this directory.