jchd Posted September 17, 2017 Share Posted September 17, 2017 13 minutes ago, czardas said: I think I got it Your French is improving! This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
czardas Posted September 17, 2017 Share Posted September 17, 2017 (edited) French is my worst foreign language. Let's try without Google then you can laugh: Je doit parler plus français! Edit: The red letters were added after I checked my mistakes. I actually thought it was like that. If I practice, what I learned will come back to me. Edited September 17, 2017 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
jchd Posted September 17, 2017 Share Posted September 17, 2017 That's just like my own Welsh (Cymraeg llenyddol) This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
czardas Posted September 17, 2017 Share Posted September 17, 2017 I'm fairly good with pronunciation and can even say 'parapluie'. Not many Germans can pronounce the word 'squirrel'.https://www.youtube.com/watch?v=0FRD4uq1mVw operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
RTFC Posted September 17, 2017 Share Posted September 17, 2017 @czardas & @jchd: Ladies, aren't we getting a bit off-topic here? @Belini: I fear your quest is completely futile. If it's on screen, it can be copied. Never heard of screen recording software? czardas 1 My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
Belini Posted September 17, 2017 Author Share Posted September 17, 2017 Quote I would have thought _Crypt_DecryptData() would suffice (I haven't used it, so I'm not sure). Unfortunately videos are likely to require too much RAM. I'm also not sure how you would then play the video(s) after that. I'm sure it's doable though. If it were just plain text, it would be easy. really should spend a lot of memory because they are videos for 5 to 10 minutes! Quote In fact the final answer has been posted to the French forum, where the OP is duplicating his request. They are not equal topics, here I want to know how to prevent copying and ln the French forum I asked how to know when the copy started! I think knowing when the copy started will be the best alternative because then I can use Shutdown(1) and avoid copying the whole file! My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
Belini Posted September 17, 2017 Author Share Posted September 17, 2017 25 minutes ago, RTFC said: @czardas & @jchd: Ladies, aren't we getting a bit off-topic here? @Belini: I fear your quest is completely futile. If it's on screen, it can be copied. Never heard of screen recording software? In this case not because there are more than 8,000 videos and would have to play all the way to the end to copy! If copying the unprotected file does not need to capture what is on the screen and does not touch it all to copy so I want to avoid direct copying of the decrypted file! if I know when the file copy was started I can turn off the pc and avoid copying it! My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
RTFC Posted September 17, 2017 Share Posted September 17, 2017 (edited) 16 minutes ago, Belini said: there are more than 8,000 videos and would have to play all the way to the end to copy! Funny you should perceive this as an obstacle on an AutoIt forum (Automate anything!). AFAIK: 1) GetDC() does not trigger any windows message, interrupt, or anything else you can reliably hook into, 2) you cannot possibly detect every possible screen recorder software available (or written on-the-fly) as running process; 3) Using Skype, TeamViewer, or plain RDP, you can set up a 1-to-1 screen duplicate to any other machine, and record from there. Edited September 17, 2017 by RTFC My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
Belini Posted September 17, 2017 Author Share Posted September 17, 2017 It gives to automate yes but it would take a lot of time, my concern is just to avoid direct copy of the same file! My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
UEZ Posted September 17, 2017 Share Posted September 17, 2017 Is this working? expandcollapse popup#include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WinAPIFiles.au3> Example() Func Example() Local $iW = 600, $iH = 400, $iW2 = $iW / 2, $iH2 = $iH / 2 Local $hGUI = GUICreate("GDI+ Example", 600, 400) GUISetState(@SW_SHOW) _GDIPlus_Startup() Local $hCanvas = _GDIPlus_GraphicsCreateFromHWND($hGUI) Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) Local $hGraphics = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsSetSmoothingMode($hGraphics, $GDIP_SMOOTHINGMODE_HIGHQUALITY) _GDIPlus_GraphicsClear($hGraphics, 0xFF000000) Local $hIA = _GDIPlus_ImageAttributesCreate() Local Const $fGamma = 0.00005 _GDIPlus_ImageAttributesSetGamma($hIA, $fGamma, 1) Local $hBrush = _GDIPlus_BrushCreateSolid(0xB0FF0000) _GDIPlus_GraphicsFillEllipse($hGraphics, $iW2 - 100, $iH2 - 150, 200, 200, $hBrush) _GDIPlus_BrushSetSolidColor($hBrush, 0xB000FF00) _GDIPlus_GraphicsFillEllipse($hGraphics, $iW2, $iH2 - 50, 200, 200, $hBrush) _GDIPlus_BrushSetSolidColor($hBrush, 0xB00000FF) _GDIPlus_GraphicsFillEllipse($hGraphics, $iW2 - 150, $iH2 - 50, 200, 200, $hBrush) _GDIPlus_GraphicsDrawImageRectRect($hCanvas, $hBitmap, 0, 0, $iW, $iH, 0, 0, $iW, $iH, $hIA) ;lock the file ;----------------------------------------------------------- Local $hFile = _WinAPI_CreateFile(@ScriptFullPath, 2, 2, 0) _WinAPI_LockFile($hFile, 0, FileGetSize(@ScriptFullPath)) ;----------------------------------------------------------- ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Clean up resources _GDIPlus_ImageAttributesDispose($hIA) _GDIPlus_BrushDispose($hBrush) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_GraphicsDispose($hCanvas) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_Shutdown() ;Unlock the file ;----------------------------------------------------------- _WinAPI_UnlockFile($hFile, 0, FileGetSize(@ScriptFullPath)) _WinAPI_CloseHandle($hFile) ;----------------------------------------------------------- EndFunc ;==>Example ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_ImageAttributesSetGamma ; Description ...: Sets the gamma value for a specified category. ; Syntax ........: _GDIPlus_ImageAttributesSetGamma($hImageAttributes[, $fGamma = 0[, $iColorAdjustType = 0[, $bEnable = True]]]) ; Parameters ....: $hImageAttributes - a handle value. ; $fGamma - [optional] a floating point value. Single precision value number that specifies the gamma value. ; Default is 0. ; $iColorAdjustType - [optional] an integer value. Default is 0. -> https://msdn.microsoft.com/en-us/library/windows/desktop/ms534089(v=vs.85).aspx ; $bEnable - [optional] a boolean value. Boolean value that specifies whether a separate gamma is enabled ; for the category specified by the type parameter. Default is True. ; Return values .: Success: True ; Failure: 0 and sets the @error flag to non-zero, @extended may contain GPSTATUS error code ($GPID_ERR*). ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: https://msdn.microsoft.com/en-us/library/windows/desktop/ms535432(v=vs.85).aspx ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_ImageAttributesSetGamma($hImageAttributes, $fGamma = 0, $iColorAdjustType = 0, $bEnable = True) Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetImageAttributesGamma", "handle", $hImageAttributes, "ubyte", $iColorAdjustType, "bool", $bEnable, "float", $fGamma) If @error Then Return SetError(@error, @extended, False) If $aResult[0] Then Return SetError(10, $aResult[0], False) Return True EndFunc ;==>_GDIPlus_ImageAttributesSetGamma The GDI+ stuff around is just a code to run. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Belini Posted September 17, 2017 Author Share Posted September 17, 2017 (edited) @UEZ _WinAPI_LockFile () can prevent copying but does not let the player play the video too and if I put the video to play before _WinAPI_LockFile () can not protect because the video is already playing! #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WinAPIFiles.au3> Example() Func Example() Local $iW = 600, $iH = 400, $iW2 = $iW / 2, $iH2 = $iH / 2 Local $hGUI = GUICreate("GDI+ Example", 600, 400) GUISetState(@SW_SHOW) _GDIPlus_Startup() ;lock the file Local $file = @ScriptDir & "\video.mp4" ;----------------------------------------------------------- Local $hFile = _WinAPI_CreateFile($file, 2, 2, 0) _WinAPI_LockFile($hFile, 0, FileGetSize($file)) ;----------------------------------------------------------- ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _GDIPlus_Shutdown() ;Unlock the file ;----------------------------------------------------------- _WinAPI_UnlockFile($hFile, 0, FileGetSize($file)) _WinAPI_CloseHandle($hFile) ;----------------------------------------------------------- EndFunc ;==>Example Edited September 17, 2017 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
mikell Posted September 17, 2017 Share Posted September 17, 2017 4 hours ago, RTFC said: Funny you should perceive this as an obstacle on an AutoIt forum I totally agree, espacially since 'screen recorder software' was the obvious answer I provided on the french forum 1 file for 8000 videos, does that mean that your program displays parts on demand depending on given parameters ? Sooo easy to automate Link to comment Share on other sites More sharing options...
Belini Posted September 18, 2017 Author Share Posted September 18, 2017 (edited) 15 hours ago, mikell said: I totally agree, espacially since 'screen recorder software' was the obvious answer I provided on the french forum 1 file for 8000 videos, does that mean that your program displays parts on demand depending on given parameters ? Sooo easy to automate To use a screen recorder would need to know when a file started and when it finished and also put the right name on each file captured or capture all and then go hacking, it would need to have a good knowledge to do and not everyone has! I really need to know when a copy was started, how can I know when a file is being copied? Edited September 18, 2017 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
jchd Posted September 18, 2017 Share Posted September 18, 2017 You can achieve that by hooking into CreateFile(). https://www.codeproject.com/articles/30537/windows-file-monitoring-system-using-windows-api-h czardas 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Belini Posted September 18, 2017 Author Share Posted September 18, 2017 I'll see if I can track the creation of new files here, thanks for the tip! My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
jchd Posted September 18, 2017 Share Posted September 18, 2017 Not only created but opened as well. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Belini Posted September 18, 2017 Author Share Posted September 18, 2017 the file will be opened anyway because it will be used by the video player! My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
jchd Posted September 18, 2017 Share Posted September 18, 2017 (edited) So ? When a second thread/process will want to open it for itself, won't it invoke CreateFile()? Yes it will since that's the only way to access a file. Edited September 18, 2017 by jchd This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Belini Posted September 18, 2017 Author Share Posted September 18, 2017 If I can tell when another file was created, it will solve my problem! My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
Fabio_iGames Posted October 4, 2017 Share Posted October 4, 2017 (edited) On 13/09/2017 at 6:00 PM, Luigi said: My mystake, I want say: https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_LockFile.htm This tip drops like a glove. Very cool Luigi Edited October 22, 2017 by Fabio_iGames Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now