Search the Community
Showing results for tags 'file name'.
-
I'm trying to build a script that will eventually create a log with time stamps of the active windows used on a workstation throughout the day, but I'm having a problem figuring out how to actually get this information. For example, if someone has Microsoft Word open, I'd like to be able to pop-up/log "word.exe" along with the full path to that file if at all possible (sort of like seeing the application DETAILS name in Windows Task Manager and being able to right-click on the name and choose "Open FIle Location" to get the full path to the file). Is what I'm asking even possible within the realm of AutoIt? I have the below script as a test that gets me the current active window handle and title in a message box every 6 seconds, but for the life of me, I don't know what code I need to use to get the actual .EXE name/path of the active window. #include <MsgBoxConstants.au3> Local $i = 0 Do Global $handle = WinGetHandle("[ACTIVE]") Global $title = WinGetTitle("[ACTIVE]") MsgBox(0,"Active Handle & Title",$handle & " - " & $title, 3) $i = $i + 1 Sleep(3000) Until $i = 100 Any help or suggestions would be greatly appreciated. I don't mind figuring out the code myself, if someone could just point me in the right direction. Thanks, TBWalker
- 7 replies
-
- active window
- file name
-
(and 2 more)
Tagged with:
-
Hi there, I have a few download folders and they contains hundreds of downloaded files. So i need to cut each file and make a new folder there and paste my file inside that folder. This is the steps to automate; 1. If i select a file in win explorer and right click it, then i need a context menu option there. ("Move file into folder") 2. If i select the context menu item, then 2 a. Find the name of the selected file 2 b. Cut the file and create a new folder there. 2 c. Rename the folder with the filename(i.e. if file name is "Winrar_setup_32_Bit.exe", then the folder name should be "Winrar". 2 d. Paste the file inside the folder. For this task, i know; 1. how to create a folder 2. how to cut n number of letters from file name with StringLeft() And i don't know; 1. how to make a context menu entry for my script. 2. how to get the selected file name 3. how to rename the folder 4. how to cut and paste the selected file.