Jump to content

Varian

Active Members
  • Posts

    675
  • Joined

  • Last visited

About Varian

  • Birthday 06/17/1971

Profile Information

  • Member Title
    464C4544474C494E47
  • Location
    North Carolina

Recent Profile Visitors

619 profile views

Varian's Achievements

Universalist

Universalist (7/7)

8

Reputation

  1. Can someone point me to a solution (if it exists) where I can find examples/ of someone redirecting a CMD window that has a percentage/progress output to a GUI that does not scroll horizontally. I understand and am able to get the commands output to my GUI, it's just that when the progress/percentage comes up, the output just scrolls horizontally along the same line in my GUI. Will this just require me to format the data change sent to my GUI, so that it recognizes the progress and updates the edit control differently (so that it scrolls vertically, for example)? Any pointers will be greatly appreciated.
  2. Have you tried a simple Activate/Wait util Active loop? Do WinActivate("classname=TMessageForm") Sleep(10) Until WinActive("classname=TMessageForm")
  3. It appears as though you are searching for each directory that contains an "fla" file and copying "mov.reg" to that directory. You can try this as it is little less code: #include <Array.au3> #include <RecFileListToArray.au3> AutoItSetOption("TrayIconDebug", True) Local $sPath, $movFILE, $DestDir $sPath = "D:Temp" $movFILE = "D:mov.veg" $flaDIR = _RecFileListToArray($sPath, "*.fla", 1, 1, 0, 2) For $i = 1 To $flaDIR[0] $DestDir = StringRegExpReplace($flaDIR[$i], '[^]+$', '') FileCopy($movFILE, $DestDir) Next
  4. This captures each line that ends with an underscore or ends with an underscore & a comment; This returns the entire matched line up to the underscore #include <Array.au3> Local $iString $iString &= 'MsgBox(4096, "Title _ v1", "This program is free software: you can redistribute it and/or modify" & _' & @LF $iString &= ' "it under the terms of the GNU General Public License " _" & _ ; Only comment!' & @LF $iString &= ' "as published by the Free Software Foundation, either version 3" & _' & @LF $iString &= ' "of the License, or (at your option) any later version.")' & @LF $iString &= '$aRtl = DllCall("ntdll.dll", "int", "RtlCompressBuffer", _' & @LF $iString &= ' "ushort", 2, _ ;------> CompressFormat' & @LF $iString &= ' "ptr", $pInput, _ ;---> ptrSrceBuffer' & @LF $iString &= ' "dword", $iSize, _ ;--> SrceBufferSize' & @LF $iString &= ' "ptr", $pBuffer, _ ;--> ptrDestBuffer' & @LF $iString &= ' "dword", $iBufLen, _ ;> DestBufferSize' & @LF $iString &= ' "dword", 4096, _ ;----> ChunkSize' & @LF $iString &= ' "dword*", 0, _ ;------> CompressedSize' & @LF $iString &= ' "ptr", $pWrkSp) ;-----> WorkspaceBuffer' & @LF $iString &= '_ ; Only comment!' MsgBox(262208, 'Original String', $iString) RegEx($iString) Func RegEx($nString) Local $nPattern = "(?m)(^.*_)(?:s*$|s*;.*s*$)" ConsoleWrite($nPattern & @CR) Local $nRegex = StringRegExp($nString, $nPattern, 3) If @error Then Exit @extended _ArrayDisplay($nRegex) EndFunc ;==>RegEx
  5. This change will work: Local $nPattern = "['"& '"]' & "([^'"& '"]*?)' & '["' & "']" I generally use the capturing groups on info that I want returned when using the Global matches (3)
  6. If this script will not harm your security, you can just try "_FileCreate" and "_TempFile" to create a file on the share. If it succeeds, immediately delete the file and continue accordingly. You can read @error for success/failure with _FileCreate #include <File.au3> Local $Sharename, $Tempfile $Sharename = "ServerShare" If Not FileExists($Sharename) Then Exit MsgBox(262208, 'Error', $Sharename & " does not exist") $Tempfile = _TempFile($Sharename) If _FileCreate($Tempfile) Then MsgBox(262208, 'Success', $Tempfile & " has been created") FileDelete($Tempfile) Else MsgBox(262208, 'Error', $Tempfile & " was not created" & @LF & "Error code was " & @error) EndIf
  7. Assuming your intentions are honorable the basic problem that "MsgBox" is a blocking function so the script pauses. You can do a few things to solve your problem: Create a non-blocking GUI that displays your message box (search the forum for "NotifyBox") Call a separate Autoit Scipt (executable) that displays your Message Box Use a 3rd party program like "wizmo" or "nircmd" to display a message box
  8. I have certainly thought of that, although that is new territory for me. Is SQL Lite a singleI am really trying to avoid installing more software onto the marketing departments PCs as they are a fickle bunch and I already have to be down there too long.
  9. I would like to read registry entries and hold them into an 2D array. I then need to do an Array search on the first index. This is a "poor man's database" solution but I cannot install database software onto the PCs that need this done. I would prefer not create a document with these entries as there are about 15K entries in the registry right now and reading them from a document might be too slow. FYI, the registry entries that will be read into the array are the last playing positions from Media Player Classic(Home Cinema) and I had just exported the last playing positions to a custom location in the registry and used a loader program for MPC to search for the file to be played, and if it finds it, send that position to MPC as the start position. MPC only holds the last 20 files played, and if the file is moved to a different folder, it wil be recognized as never having been played before. The custom registry solution works but this particular dept. plays a ton of files (3K to 15K so far), and it is taking longer and longer to search through these entries. I would like to have a script that runs all the time, that stores the entries in an array and periodically exports them to a csv file for backup, and uses that file to build the array on startup. I only need help with how to interact with the array from another script, if at all possible.
  10. Is anyone else experiencing this issue with Windows 8 Release Preview & Consumer Preview: I have several scripts that automate info filling info into windows. They, of course, rely on AutoIT recognizing the windows by REGEXPTITLE & REGEXPCLASS (usually both, unless the title is blank). The scripts work fine for hours after restarting but they all eventually fail to "see" the windows even though they are visible. I am specifically working with Maxthon 3 (the Download Manager Window) and NetSetMan Pro. My understanding is that Windows 8 does not run explorer persistently & that may be an issue. I really just wanted wanted to see if anyone else has experienced this problem with the 2 "official" Windows 8 releases. I know that the software is Beta, so don't flame my post with that old chestnut. EDIT: This is a multi computer problem
  11. You will need to either edit or create the file: "desktop.ini" in the folder whose icon that you want to modify. the basic syntax for a customized icon i like so: [.ShellClassInfo] IconResource=C:Windowssystem32SHELL32.dll,19 Be advised that if the Desktop.ini file already exists you may have to change the attributes to modify or overwrite the file. You will also need to refresh the icon cache to view the updated icon. As an example: $Folder = "C:Your Folder" FileSetAttrib($Folder & "Desktop.ini", "-RASHNOT") $hOpen = FileOpen($Folder & "Desktop.ini", 2) FileWrite($hOpen, "[.ShellClassInfo]" & @LF & "IconResource=C:Windowssystem32SHELL32.dll,16") FileClose($hOpen) DllCall('shell32.dll', 'none', 'SHChangeNotify', 'long', 0x08000000, 'uint', 0, 'ptr', 0, 'ptr', 0) ;Refresh Icons
  12. Are you sure that it is not a timing thing, as JohnOne suggested? Try this: Do ControlCommand($APP, "", $HandleToolbar, "SendCommandID", 32820) Sleep(100) Until WinExists('2ndWindow') Do Sleep(100) Until ControlCommand("Send Set", "", "[CLASS:Static; INSTANCE:14]", "IsEnabled", "") ;wait for control on Window 2 to be ready for Input Sleep(1000) ;your arbitray wait time Do ControlCommand("Send Set", "", "[CLASS:Static; INSTANCE:14]", "SendCommandID", 1) Sleep(100) Until Not WinExists('2ndWindow')
  13. You can also use to block only the mouse moves and/or mouse clicks
  14. Unless there is more to your problem, FileCopy or FileMove are what you are looking for. If you need to see the progress, search the forum for "Copy with Progress" or "Explorer Copy"
  15. This is not a new topic, but I would like to try your files to register Fastcopy as the default copy handler. Are you still working on this?
×
×
  • Create New...