Jump to content

wysocki

Active Members
  • Posts

    108
  • Joined

  • Last visited

  • Days Won

    1

wysocki last won the day on May 2

wysocki had the most liked content!

Profile Information

  • Location
    Los Angeles area
  • WWW
    http://terrywysocki.com

Recent Profile Visitors

593 profile views

wysocki's Achievements

  1. Modern cameras and cellphones include a lot of data about photos taken into the image as EXIF data, which includes exposure info, GPS coordinates, and exposure date/time. In many file operations (moving, editing, etc) the dates don't reflect the real time of exposure, this script fixes that. To use this script you'll have to first install the app from exiftool.org onto your computer. This script simply allows you to select a folder and it grabs the date/time from all the JPGs in it and changes their file created and modified dates to correspond to the EXIF date. Pretty basic, but just adjust the code as you like! ;PROCESS JPG IMAGES IN A SELECTED FOLDER WITH EXIFTOOL TO RETRIEVE SHOOTING DATE AND REWRITES FILE DATES. ;SCANS A DIRECTORY FOR IMAGES AND SETS THE DATES CREATED AND MODIFIED FROM THE EXIF SHOOTING DATE ;The EXIFTOOL app needs to be downloaded from https://exiftool.org/ (then adjust its folder name below) #include <autoitconstants.au3> #include <MsgBoxConstants.au3> $dirname = FileSelectFolder('Select a Folder','') Local $hSearch = FileFindFirstFile($dirname & "\*.jpg") If $hSearch = -1 Then ; Check if the search was successful. MsgBox($MB_SYSTEMMODAL, "", "Error: No JPG files were found in that folder.") exit EndIf Local $imagefile = "", $iResult = 0 local $arr[1] = ['JPG with EXIF GPS - ' & $dirname] SplashTextOn("EXIF DATE CHECK...", "Setting DATE MODIFIED from EXIF in images...",400,100,500,100) While 1 $imagefile = FileFindNextFile($hSearch) ; If there is no more file matching the search. If @error Then ExitLoop $pid = Run(@ComSpec & " /c " & 'd:\apps\exiftool.exe -DateTimeOriginal ' & $dirname & '\' & $imagefile, "", @SW_HIDE, 2) ProcessWaitClose($pid) $sOutput = StringMid(StdoutRead($pid),35) $sOutput = StringRegExpReplace($sOutput,'[: ]','') ConsoleWrite("EXF: " & $sOutput & @CRLF) ;Commment out the fields you don't want to be updated... FileSetTime($dirname & '\' & $imagefile,$sOutput, 0) ;SET FILE MODIFIED TIME TO SHOOTING TIME FROM EXIF FileSetTime($dirname & '\' & $imagefile,$sOutput, 1) ;SET FILE CREATED TIME TO SHOOTING TIME FROM EXIF ; FileSetTime($dirname & '\' & $imagefile,$sOutput, 2) ;SET FILE ACCESSED TIME TO SHOOTING TIME FROM EXIF ConsoleWrite('UPDATED:' & @CRLF) ConsoleWrite('MOD: ' & FileGetTime($dirname & '\' & $imagefile, 0, 1) & @CRLF) ConsoleWrite('CRE: ' & FileGetTime($dirname & '\' & $imagefile, 1, 1) & @CRLF) ConsoleWrite('ACC: ' & FileGetTime($dirname & '\' & $imagefile, 2, 1) & @CRLF) ControlSetText('EXIF DATE CHECK...', "", "Static1", $dirname & '\' & $imagefile & ' ' & $sOutput) WEnd FileClose($hSearch) splashoff() msgbox(64,'Done','File date processing completed.')
  2. @ioa747 : Changing trigger to "on workstation unlock" says it ran successfully when I logged back in after sleeping, but the program didn't create the log file nor fix the size of the Chrome window. And your first link sounded promising since it described my issue exactly. However disabling Touch UI did not fix the issue. The second link didn't seem to be relevant since it involved ALL windows being resized and my issue is only with Chrome. BUT! It did point me to a section of the registry where the monitor data is stored: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration So I backed up then deleted that key and when I rebooted, the keys were correctly rebuilt and my Chrome sizing issue is fixed!!! Thanks for the tip!
  3. Here's what I had: #include <Misc.au3> #include <array.au3> #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> Opt("WinTitleMatchMode",2);match any substring xConsoleWrite("-------------RUNNING--------------" & @CRLF) $hWnd = WinGetHandle("[REGEXPTITLE:(?i)(.* - Google Chrome.*)]") If $hWnd = 0 Then xConsoleWrite("Window not found!" & @CRLF) Exit EndIf $arr = WinGetPos($hWnd, "") $iX = $arr[0] $iY = $arr[1] $iWidth = $arr[2] $iHeight = $arr[3] xConsoleWrite('State ='& WinGetState($hWnd, "") & ' iX ='& $arr[0] & ' iY ='& $arr[1] & ' iW ='& $arr[2] & ' iH ='& $arr[3] & @CRLF) WinMove($hWnd,"",0,0,1000,800) WinSetState($hWnd, "", @SW_MAXIMIZE) xConsoleWrite('New State ='& WinGetState($hWnd, "") & ' iX ='& $arr[0] & ' iY ='& $arr[1] & ' iW ='& $arr[2] & ' iH ='& $arr[3] & @CRLF) Func xConsoleWrite($parm) $f = fileOpen("onwake.log",1) FileWrite($f, @YEAR & "/" & @MON & "/" & @MDAY & " " & @HOUR & ":" & @MIN & ":" & @SEC & " " & $parm) fileclose($f) EndFunc Thanks for the referral to the FAQ. Sound's interesting, but I don't do anything regarding the active state of the window (do I?). But aside from that, why doesn't the log file get created when it runs? Also, I have tried in the scheduler -> Edit Trigger -> Delay Task: 30 seconds (which is way after the window is available) and still I get no results from the script. How can I get this script to run once the system awakes fully from a sleep?
  4. While Chrome browser is maximized, I put my Win11 computer to sleep. But when I wake it up, the browser window is reduced about 3/4 in size and the size can't be changed unless I first click the window restore button (behaves as if it was already maximized). If I maximize it, then close it entirely, then open it again it's fine. Other windows also work fine. So I wrote a script to get the Chrome handle, restore size, and maximize it. The script does what it should when I run it. However, if I schedule the task to run when waking the task does nothing, even though Task Scheduler reports that it ran successfully! I even put code in the script to write to a log file while it runs, but the log file is empty. I trigger task scheduler with System -> Power-Troubleshooter -> 1 and it does get triggered upon wakeup. Just the task does nothing. Why can't the task write to the log file and get my Chrome browser handle to manipulate it when it's run from Task Scheduler?
  5. I want to take actions with my Chrome browser window but have a problem identifying it. I can't use the title of my Chrome window because it's always the text of the current tab, which is not dependable. The Class of Chrome is "Chrome_WidgetWin_1". Unfortunately, I have another app that has the same Class. Is there a way to select the Chrome window based upon its title just NOT being the one from the other app?
  6. I have a small script that I have set to run every 15 minutes via Windows Task Scheduler. It does not invoke any GUI or other interaction, but it simply contains a runwait for node to run a node.js script which manipulates the Google Tasks api. Whenever it runs, the focus is stolen from whatever I'm doing and the cursor jumps to the top left corner of my monitor. Is there any way to run the node script without this happening?
  7. I'm trying to read data from a local Chrome window while logged in to Pandora. While Pandora.com is playing the artist/song info is on display, but a ctrl-u to reveal source code does not contain any song info. It IS visible by bringing up the code inspector where all song info is visible in html entities identifiable by class/id. Is there any way with AutoIt to retrieve this current song info from that Chrome tab? Tools like WinHTTP won't work because I want to get the data from my local browser, not the server.
  8. Ack!! Right under my nose. Thanks, Tim!
  9. I need to capture the output from xml presented when I visit a webpage. I had a script in AutoHotKey that used a command to retrieve the xml into a file: UrlDownloadToFile, %url% , downloaded.html Does Autoit have this functionality somehow?
  10. I'm trying to find a way to get the text from one of my Google Tasks. I've noted that there is an API for Tasks, but it's a bit above my head since it requires knowledge of things like json, rest, java, python, etc. Is there some sort of UDF or library that I can access with AutoIt to access Tasks? I've found https://developers.google.com/tasks/reference/rest/v1/tasks/get This returns the information that I want, BUT, I have no idea of how to implement this demo into AutoIt coding!
  11. Thanks so much for the tip. I found this bit of code that I added just before defining the GUI and it works perfectly! ;Make gui DPI AWARE... If @OSVersion = 'WIN_10' Then DllCall("User32.dll", "bool", "SetProcessDpiAwarenessContext" , "HWND", "DPI_AWARENESS_CONTEXT" -2) If @OSVersion = 'WIN_81' Then DllCall("User32.dll", "bool", "SetProcessDPIAware")
  12. I bought a new Lenovo laptop and everything on the display is pretty hard for me to read, so I adjusted the display settings to 125% (which it shows as "Recommended"). But with this setting above 100%, an Autoit GUI that I created is messed up. The buttons are oversized for the dialog box and placed too far down and right. Anyone else have this issue, and is there a fix?
  13. Thanks for the idea. Your code had a couple errors in it ($idButton_Cancel has to be global and the func name should be _Resize ). But after I got it running I see what you're doing. I'll have to think about how the font resizing should gradually proceed, relative to the height and width of the dialog. Ideally I'd like the dialog to appear as if it were an image to be stretched, horizontally and vertically. This can't be done when resizing fonts.
  14. I see NO effect from any setting of the Opt("GUIResizeMode",xxxx). How should it be used and what exactly does it do? GUICtrlSetResizing(-1,1) does appear to work on the controls that I have tested so far EXCEPT that is has no effect on font size in labels and other controls. Can this be addressed?
  15. I've created many GUI based apps with Autoit, but I'd like to modify a GUI that I made that can resize (with all of its controls) or automatically display fullscreen based on the size of the display. If this is possible, what's the best approach?
×
×
  • Create New...