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