Jump to content

Leaderboard

Popular Content

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

  1. If it's any consolation, at the other end of the spectrum are freaks like myself, who tend to (speed)read an entire Help file to get a sense of the scope, modus operandi, and perhaps unsuspected capabilities of a particular piece of software. Having written large Help files myself (and even recorded a series of tutorial videos once), I do commiserate though. Perhaps you can glean some comfort from the fact that your digital footprint will probably outlast any physical one you leave on this Earth...
    3 points
  2. Hello Community, let me introduce you to one of my latest projects (with several more in the pipeline), the BIC - Batch-Image-Cropper BIC is a Batch-Image-Cropper program. It will read all of the following file-types from a given directory: *.bmp;*.jpg;*.jpeg;*.png;*.gif;*.tiff;*.emf;*.wmf;*.ico Then it will cycle through all files and show you a cropping mask to crop the images. It supports freeform rotation of the input images (press f) and a lot of additional hotkeys to speed up processing (press ? for a full list). It will not change the input images, but save all cropped images to a dedicated “_BIC” sub-directory. Sorting out the results is totally up to you. Supported output formats currently are JPG, PNG and BMP. For JPG creation BIC can use sub-binaries. JPGE is used to create JPGs from temporary PNGs, as GDI+ enforces chroma sub-sampling by default and might change colors. ExifTool can be used to copy EXIF data from input JPGs to output JPGs. Thanks to GreenCan and his Visual Image Crop (GUI), which was the starting point for BIC. The executable and the source can be downloaded from my site: https://funk.eu Enjoy, let me know what you think of SMF and with Best Regards
    1 point
  3. dHash generates a “difference hash” for a given image - a perceptual hash based on Neal Krawetz’s dHash algorithm in this “Hacker Factor” blog entry. http://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html 1. Reduce size 2. Reduce color 3. Compute the difference 4. Assign bits The resulting hash value represents the relative change in brightness intensity. To compare two hashes, just count the number of bits that are different (called Hamming distance.) A value of 0 indicates the same hash and likely a similar picture. A value greater than 10 is likely a different image, and a value between 1 and 10 is potentially a variation. dHs - dHash_v0003.zip
    1 point
  4. No worries, happens to all of us every now and then and am happy the mystery is resolved. Jos
    1 point
  5. Figured out the -25 issue, I was checking against the control X coord instead of Y coord.
    1 point
  6. The way it internally works is that SciTE will check for 2 environment variables: SCITE_HOME and SCITE_USERHOME. These are used to determine what the user home directory is to allow SciTE to be portable. So check those settings by typing this in de SciTE outputpane: set sc (and enter) Are you sure you only have one SciTE installed? Let me know what you do to make it fail so I can test the same scenario. Jos
    1 point
  7. There : #include <Constants.au3> #include <GUIConstants.au3> Local $hGUI = GUICreate ("Test", 300, 300, -1, -1,-1, $WS_EX_ACCEPTFILES) Local $idDummy = GUICtrlCreateLabel ("",0,0,300,300) GUICtrlSetState(-1, $GUI_DROPACCEPTED+$GUI_DISABLE) Local $idButton = GUICtrlCreateButton ("OK", 100,200,100,30) GUISetState () While True Switch GUIGetMsg () Case $GUI_EVENT_CLOSE, $idButton ExitLoop Case $GUI_EVENT_DROPPED ConsoleWrite ("dropped " & @GUI_DropId & @CRLF) EndSwitch WEnd
    1 point
  8. Not quite There's a working directory parameter in ShellExecute that they'd like you to use. Local $CWD = "\\ksbl.local\softwaredata\CWD-Daten\ClinicWD\exe\ClinicWD.exe" Local $sWorkingDirectory = "\\ksbl.local\softwaredata\CWD-Daten\ClinicWD\exe\" if FileExists($CWD) Then $PID=ShellExecute($CWD, "", $sWorkingDirectory)) MsgBox(0,"CWD File found","The Program " & $CWD & " has been started with PID=" & $PID) Else MsgBox(48,"CWD not found","The Program " & $CWD & " doesn't seem to exist.") EndIf
    1 point
  9. If I type your question "Registry key for PDF File and chrome" directly on Google, then the first hit is : https://support.google.com/chrome/a/thread/3445027?hl=en The questioner wants to achieve the opposite, but maybe this info will help you. Registry Hive HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER Registry Path Software\Policies\Google\Chrome Value Name AlwaysOpenPdfExternally Value Type REG_DWORD Enabled Value 1 Disabled Value 0
    1 point
  10. @JohnWIlling Unfortunately, that still won't allow you to connect to an instance of Chrome that wasn't launched with Chromedriver.
    1 point
  11. StdOutRead should take the same time as piping it to @TempDir & "\list-stout.txt". The issue with script above is scraping of text on each line, I tested it on a 9.7GB file with 4313 files and 1498 folders and it took about 3 minutes to complete, removing everything but capturing the file names and using the same 9.7GB file I was able to cut this down to 15 secs using the following: #include <Array.au3> #include <AutoItConstants.au3> Global $s7Zip = @OSArch = "x64" ? EnvGet("ProgramW6432") & "\7-Zip" : @ProgramFilesDir & "\7-Zip" Global $a7ZArchiveList = _7ZList("C:\test 1\1.05.24.7z", 1) _ArrayDisplay($a7ZArchiveList, "7-Zip Archive List", "", 0, Default, "Date/Time|Attributes|Size|Compressed|FileName") Func _7ZList($_sArchivePath, $iFolderFlag = 0) ;~ 0 = Don't Include Folders, 1 = Include Folders Local $sOutput = "", $sError = "" Local $iProcessId = Run($s7Zip & '\7z.exe l -r "' & $_sArchivePath & '"', "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $sOutput &= StdoutRead($iProcessId) If @error Then ExitLoop WEnd While 1 $sError &= StderrRead($iProcessId) If @error Then ExitLoop WEnd If $sOutput <> "" Then MsgBox(4096, "7-Zip Archive List", $sOutput) If StringStripWS($sError, 8) <> "" Then Exit MsgBox(4096, "7-Zip Error", $sError) Local $bStart = False, $aOutput = StringSplit($sOutput, @CRLF), $a7ZArchive[1] For $i = $aOutput[0] To 1 Step - 1 If StringStripWS($aOutput[$i], 8) = "" Then ContinueLoop If StringInStr($aOutput[$i], "------------------- ----- ------------ ------------ ------------------------") Then If $bStart = False Then $bStart = True ContinueLoop ElseIf $bStart = True Then $bStart = False ContinueLoop EndIf EndIf If $bStart Then If $iFolderFlag = 0 And StringInStr(StringStripWS(StringMid($aOutput[$i], 21, 5), 7), "D") Then ContinueLoop _ArrayAdd($a7ZArchive, StringStripWS(StringMid($aOutput[$i], 54, StringLen($aOutput[$i]) - 53), 7)) EndIf Next _ArraySort($a7ZArchive) $a7ZArchive[0] = UBound($a7ZArchive) - 1 Return $a7ZArchive EndFunc
    1 point
  12. Hey, i'm new to the advanced features of autoit programming and my knowledge is basic at best but i've made use of the predefined functions to make a program which searches and pulls files from certain computers on a network. Problem i'm facing now is some of the data is zipped using the .tar.bz2 compression format and i'm supposed to find a way to get my program to extract it. I've tried using some UDF's I searched but they didn't seem to work for me, even the examples provided inside weren't working(I assume it's a problem with the .dll's): '?do=embed' frameborder='0' data-embedContent>> Then I stumbled across this line $Extract = Run(@ScriptDir & '\7z.exe' & ' x "' & $Source & '" ' & "-y -o" & '"' & $Dest & '"', "", @SW_HIDE) in this thread: '?do=embed' frameborder='0' data-embedContent>> It dawned on me then that there's much more to the 'run' family of functions that I initially thought. Provided I had 7zip installed, I wouldn't have to externally run and compile into my exe the .dll file using autoit. Unfortunately the run code didn't run for me as well, even after changing @ScriptDIr to @ProgramfilesDir and changing from 7z.exe to 7zG.exe(And yes, i'm sure 7z is installed in my program files directory and has both those exe files.). Will some of you pros here help a newbie like myself by explaining how to read and understand what was stated in the run? Where can I learn more about controlling programs this way without accessing their GUI's? The help file was useful but only partly, maybe because I don't know where to look.
    1 point
  13. You are responsible for the content you post on this site. Most of the site is a public forum and the private sections have only limited controls over those who can access them - this is particularly true of "Chat". So treat posting here as if you were speaking in a crowded room surrounded by strangers. Recent high-profile defamation events on other sites illustrate that there are ways in which third parties can force personal data, including contents of personal messages, to be released by site owners. Be careful - libelous/defamatory posts can and have landed members of these other sites in legal hot water. Your anonymity is not guaranteed in such situations. M23
    1 point
  14. I found a simple solution to reconnect to an existing chromedriver. Once the driver is loaded, the "session id" is returned. Subsequent communication is via TCP to the defined port while passing in the session id. Global $sSessionFileName = "Session.ID" $sSession = _WD_CreateSession($sDesiredCapabilities) If @error <> $_WD_ERROR_Success Then Exit -1 EndIf FileWrite($sSessionFileName, $sSession & @CRLF) What I've done is to write out to a file the value of the sessionid following the call to _WD_CreateSession. Then when restarting an new app, I would call the following: Func _WD_ReAttach($Type)     Local Const $sFuncName = "_WD_ReAttach"     Switch $Type         Case $eFireFox             SetupFireFox()         Case $eChrome             SetupChrome()         Case $eEdge             SetupEdge()     EndSwitch     Local $pFile = FileOpen($sSessionFileName, 0)     If (@error = 0) Then         $sSession = FileReadLine($pFile)     EndIf EndFunc   ;==>_WD_ReAttach Which sets up the _WD_Option then reads in the saved session string. I can then continue interacting with the Chrome driver.... John W.
    0 points
×
×
  • Create New...