Run Edit not working correctly

Get help with using AutoHotkey and its commands and hotkeys
zvit
Posts: 58
Joined: 07 Nov 2017, 06:15

Run Edit not working correctly

26 Dec 2019, 01:37

My code is supposed to open a selected ahk file in VS CODE.
After restarting my computer, it will work three or four times and then it will stop working, not opening the file anymore.
VS CODE process is not running when I try it.

Any suggestions as to why?

Here's my code:

Code: Select all

#j::
    Clipboard := ""
    Send, ^c
    ClipWait, 2 ;waits for the clipboard to have content
    file := clipboard 
    SplitPath, file, name,, ext

    IfNotEqual, ext, ahk ;didn't select an .ahk file
    {
        Msgbox, %name% is not an ahk file.
        Return
    }
    else
    {
        Run Edit %Clipboard%
    }
return

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], FabianoCrispin, Google [Bot], Hayden, johnneedshelp, majstang, Mesvir, prasad383, puk_, Smile_ and 47 guests