Delete file button without unfocusing the current selected file

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Minoo
Posts: 4
Joined: 06 Nov 2017, 06:30

Delete file button without unfocusing the current selected file

20 Nov 2018, 09:43

Hi,
I want to create a gui button that deletes the currently selected file in file explorer.

My button looks like I want it too but when I click the button it unfocuses the selected file in file explorer and the file doesn't get deleted. Can I keep the file selected when pressing the gui button?
Thank you in advance

Here's my code:

Code: Select all

#NoEnv
#NoTrayIcon
#SingleInstance Force
Gui, Add, Button, gDelete y-2 x-2 w110 h133, Delete
Gui, Show, w100 h100,
WinWait, deleter.ahk
WinSet, Transparent, 255, deleter.ahk
WinSet, AlwaysOnTop, On, deleter.ahk
WinSet, Style, -0xC40000 , deleter.ahk
exit

Delete:
Send Delete

return
Rohwedder
Posts: 7644
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Delete file button without unfocusing the current selected file

20 Nov 2018, 10:34

Hallo,
try:

Code: Select all

Delete:
Send, !{Tab}{Del}

return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, Google [Bot], inseption86, jaka1, LuckyJoe, Rohwedder and 337 guests