Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/12/2024 in all areas

  1. I did it and it works so you have to figure out your issue or to post a runnable script to replicate the behavior.
    1 point
  2. you could try it like this... $sFile = FileGetShortName($sFile)
    1 point
  3. GMK

    OOo/LibO Calc UDF

    I decided to enhance the functionality of the OOo COM UDF found >here and >here. Thanks to Leagnus and Andy G for providing the initial functions and framework. This UDF includes the following working functions: _OOoCalc_BookNew _OOoCalc_BookOpen _OOoCalc_BookAttach _OOoCalc_BookSave _OOoCalc_BookSaveAs _OOoCalc_BookClose _OOoCalc_WriteCell _OOoCalc_WriteFormula _OOoCalc_WriteFromArray _OOoCalc_HyperlinkInsert _OOoCalc_RangeMoveOrCopy _OOoCalc_RangeSort _OOoCalc_RangeClearContents _OOoCalc_CreateBorders _OOoCalc_NumberFormat _OOoCalc_ReadCell _OOoCalc_ReadSheetToArray _OOoCalc_RowDelete _OOoCalc_ColumnDelete _OOoCalc_RowInsert _OOoCalc_ColumnInsert _OOoCalc_SheetAddNew _OOoCalc_SheetDelete _OOoCalc_SheetNameGet _OOoCalc_SheetNameSet _OOoCalc_SheetList _OOoCalc_SheetActivate _OOoCalc_SheetSetVisibility _OOoCalc_SheetMove _OOoCalc_SheetPrint _OOoCalc_HorizontalAlignSet _OOoCalc_FontSetProperties _OOoCalc_CellSetColors _OOoCalc_RowSetColors _OOoCalc_ColumnSetColors _OOoCalc_RowSetProperties _OOoCalc_ColumnSetProperties _OOoCalc_FindInRange _OOoCalc_ReplaceInRange Please help me test this and let me know of any problems, questions, suggestions or comments you may have. Edit (August 5, 2016): Latest files have been uploaded. Script-breaking changes include renaming the functions to start with _OOoCalc_. Edit (November 14, 2016): New version, including fixed sort function! Edit (November 15, 2016): Lots of minor changes including tightening up the error checking. Edit (November 16, 2016): Added ByRef to object parameters. Edited demo. OOoCalcConstants.au3 OOoCalc.au3 OOoCalc_Demo.au3
    1 point
  4. rohmanabdur

    OOo/LibO Calc UDF

    A newbie to AutoIt here.. I just want to thank @GMK for this awesome UDF. Absolutely amazing and inspiring.
    1 point
  5. ..how to discern if the button class is a button a radio button or, something else. So I shamelessly took the code from ControlViewer to use in your code. You'd add: ConsoleWrite(@CRLF & 'Class:' & _WinAPI_GetClassName($vCtrl) & ' Theme:' & $sThemeName & '::' & $sThemeList & @TAB & hWnd2Styles($vCtrl) ) This is just an idea. You can cook code it without the strings. The 2 files are: GUIStyles.inc.au3 and GUIStyles.au3 then you'll get something like: Class:Static Theme::: SS_CENTER, SS_RIGHT, SS_NOTIFY, WS_CHILD, WS_VISIBLE, WS_TABSTOP Class:Static Theme::: SS_NOTIFY, WS_CHILD, WS_VISIBLE Class:Button Theme::: BS_GROUPBOX, WS_CHILD, WS_VISIBLE, WS_GROUP Class:Button Theme::: BS_AUTORADIOBUTTON, WS_CHILD, WS_VISIBLE, WS_TABSTOP Class:Button Theme::: BS_AUTORADIOBUTTON, WS_CHILD, WS_VISIBLE Class:Button Theme::: BS_GROUPBOX, WS_CHILD, WS_VISIBLE, WS_GROUP Class:Static Theme::: SS_NOTIFY, WS_CHILD, WS_VISIBLE Hope it helps
    1 point
  6. Try using copy post field instead of post field
    1 point
  7. Not sure if it is possible. PrintWindow requires to accept the message WM_PRINT. Pretty confident that Desktop will not respond to it. So at the end of the day, you need to ask yourself what you really need to know. And choose how you can securely get this information without a human looking at it.... Another option (beside locking the PC) is to lock total input (keyboard and mouse : look at my signature for it). Then you can do pretty much all you want ! ps. there is ways to shutdown the screen but PrintWindow will still work if the PC is not locked (it will not work will all monitors since some always research if there is a possible input from HDMI, VGA, etc). But with a black screen without any possible input, it is quite secure...On the other hand you will need to kill the process to gain access to your PC again.
    1 point
  8. ..the canvas shows the locked screen. That's pretty much that. unless https://www.autoitscript.com/forum/topic/194120-capturing-screenshots-while-computer-is-locked/?do=findComment&comment=1397338 works ?
    1 point
  9. wraithdu

    _LargeFileCopy UDF

    Several people have had problems with their GUIs freezing when they try to copy large files using FileCopy(). This is because FileCopy() is a blocking function, and the GUI stops responding to messages from the OS during the operation. If that goes on long enough, the OS thinks it is hung and you get the (Not Responding) thing going on. Here's a function that copies large files using Windows API calls in 8MB 2 MB chunks. This keeps the GUI alive and responsive. I've added additional copy verification functionality as well (disabled by default). Take a look at my A3COPY project for a great usage example of this UDF. Update: 1/31/13 - Moved a few more functions into _FileEx. - Fixed a bug in GetDiskClusterSize function. Update: 10/8/12 - Fixed bug due to missing RtlCopyMemory and RtlCompareMemory exports in x86 kernel32.dll. Now uses RtlMoveMemory and RtlCompareMemory from ntdll.dll (sorry). Update: 10/4/12 Read NOTES at top of UDF - Reduced default buffer size to 2 MB - Added flags for copying source file attributes, all three file times individually, ACL security descriptors and ownership, and NTFS specific compression and encryption - Optimized buffer creation - Enhanced path handling to fully support UNC and network conventions ( C:... , ?C:... , srvshare... , ?UNCsrvshare... ) - Removed C runtime functions (msvcrt.dll) in favor of native kernel32 functions - Code cleanup and many optimizations in LFC and the accompanying _FileEx UDF Update: 4/15/11 - Added additional verification methods - bit by bit, and size only - The default verification method (ie iFlag 8) is now bit by bit - it is faster and less computationally intensive than MD5 hashing, it also allows the function to bail out early in the case of a failed copy operation Update: 3/9/11 SCRIPT BREAKING CHANGES - Combined some parameters into one iFlags parameter - Re-ordered some parameters based on priority - Added a parameter to specify a different read buffer size - Destination file is now opened with GENERIC_READ | GENERIC_WRITE per MSDN for better compatibility copying files across a network - No longer create destination directory structure unless specified in iFlags parameter Update: 9/20/10 - Removed tracexxx's hashing functions (sorry!) in favor of a different method which is not RAM limited - Hashing algorithm can be specified (those supported by Crypt.au3: CALG_MD2, CALG_MD4, CALG_MD5, CALG_SHA1) Update: 8/26/10 - Fix for failed verification of 0 byte files - Added check for 0 byte source in RAW functions Update: 8/22/10 - Small change to CreateFile function to avoid errors when opening SYSTEM or HIDDEN files when specifying CREATE_ALWAYS. Update: 8/10/10 - Added _LargeFileCopyUnbuffered and _LargeRawCopyUnbuffered which will copy files using unbuffered I/O. - MD5 hashing of the source file / memory block is now done on the fly from the memory buffer. This avoids an additional read of the source file later on and saves time. - Destination file MD5 hashing is now done with trancexxx's nice hashing UDF. It uses the Windows API and is really fast. Update: 7/9/2010 - Added _LargeRawCopy which will copy large memory blocks (usually from an embedded resource) to a file in the same manner as _LargeFileCopy. This function also has the verify functionality via MD5 hash. Update: 7/8/2010 - Added optional user function and variable parameters. This function, if given, will be called after each write operation with the total bytes written, total file size in bytes, and the user given variable. This is perfect for a copy-with-progess type of function call. Example #NoTrayIcon #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <_LargeFileCopy.au3> _Main() Func _Main() Local $msg, $timer, $ret Local $src = "ubuntu-10.04-desktop-i386.iso" ; <---- path to a really large file goes here, recommended 600MB+ Local $destpath = @DesktopDir & "testdir" ; <---- destination path goes here GUICreate("File Copy Test", 250, 150) GUICtrlCreateLabel("Try to interact with the GUI during file copy...", 20, 15) Local $go = GUICtrlCreateButton("Copy Large File", 50, 50, 150, 50) Local $doing = GUICtrlCreateLabel("Ready...", 20, 120, 200) GUISetState() Do $msg = GUIGetMsg() If $msg = $go Then ; create destination path DirCreate($destpath) ; internal FileCopy() function GUICtrlSetData($doing, "FileCopy()...") $timer = TimerInit() ConsoleWrite("FileCopy:" & @CRLF) $ret = FileCopy($src, $destpath, 1) ConsoleWrite("return: " & $ret & @CRLF & "error: " & @error & @CRLF & "time: " & TimerDiff($timer) & " ms" & @CRLF) ConsoleWrite("====================" & @CRLF) ; _LargeFileCopy() UDF function GUICtrlSetData($doing, "_LargeFileCopy()...") $timer = TimerInit() ConsoleWrite("_LargeFileCopy:" & @CRLF) $ret = _LargeFileCopy($src, $destpath, 1) ConsoleWrite("return: " & $ret & @CRLF & "error: " & @error & @CRLF & "time: " & TimerDiff($timer) & " ms" & @CRLF) ConsoleWrite("====================" & @CRLF) GUICtrlSetData($doing, "Ready...") EndIf Until $msg = -3 EndFuncLargeFileCopy.zip
    1 point
×
×
  • Create New...