Can anybody explain this? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Smile_
Posts: 858
Joined: 03 May 2020, 00:51

Can anybody explain this?

22 Oct 2021, 13:35

Why FileExist can't find the Google Chrome shortcut?, it returns an empty string.
Loop, Files also doesn't detect it.

Code: Select all

Msgbox % FileExist(A_Desktop "\Google Chrome.lnk")
Attachments
2021-10-22_193524.png
2021-10-22_193524.png (190.44 KiB) Viewed 510 times
garry
Posts: 3772
Joined: 22 Dec 2013, 12:50

Re: Can anybody explain this?

22 Oct 2021, 14:00

what I see , use a_desktopcommon

Code: Select all

f:="C:\users\public\desktop\Google Chrome.lnk"
;   C:\users\GARRY\desktop  > a_desktop
run,%f%
msgbox,%a_desktopcommon%

Code: Select all

F2:=a_desktopcommon . "\Google Chrome.lnk"
Msgbox % FileExist(F2)
User avatar
kunkel321
Posts: 1073
Joined: 30 Nov 2015, 21:19

Re: Can anybody explain this?

22 Oct 2021, 14:07

I don't know the answer (not an expert). But it is interesting that this:

Code: Select all

Msgbox % FileExist(A_Desktop . "\SciTE.lnk")
Returns an "A"
Note that this link file does exist for me. Google Chrome.lnk also exists, but returns nothing.
ste(phen|ve) kunkel
User avatar
JoeWinograd
Posts: 2202
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Can anybody explain this?  Topic is solved

22 Oct 2021, 14:18

Note that A_Desktop is the user desktop. Maybe the links are on the public (All Users) desktop. That variable is A_DesktopCommon. Regards, Joe

Edit: I see that garry already posted this.
User avatar
Smile_
Posts: 858
Joined: 03 May 2020, 00:51

Re: Can anybody explain this?

22 Oct 2021, 14:22

Thank you everybody for sharing thoughts.
@JoeWinograd, @garry Yes that is it, that shortcut was on Public desktop and I was trying with a user's one, so that is why it couldn't work using A_Desktop.

I managed to note that and then I saw your post so it is confirmed.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], jollyjoe, just me, silelunu and 325 guests