To invoke explorer to bring up a folder with cursor stay at certain place Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
eagerahk
Posts: 122
Joined: 02 Dec 2015, 06:27

To invoke explorer to bring up a folder with cursor stay at certain place

Post by eagerahk » 28 Jan 2023, 17:46

If a folder, D:\xxx has 3 files, file1.doc, file2.xls, file3.ppt, the following code tries to invoke explorer to bring up the folder with the cursor stay at file2.xls?

[Mod edit: Removed non-working ChatGPT code.]

I tried the code, it brought up the folder, but the cursor did not stay where I wished.
Does anyone know how to fix this? Thanks a lot!

gregster
Posts: 9056
Joined: 30 Sep 2013, 06:48

Re: To invoke explorer to bring up a folder with cursor stay at certain place

Post by gregster » 28 Jan 2023, 18:13

Well, replicating the AI code from the locked topic, just without mentioning ChatGPT, is actually not what I suggested. :problem:

I suggested asking questions about your own code (attempts). If (for whatever reasons), you don't have anything to show, it would be better to don't post any code at all. In that case, a detailed problem description would be prefered.
Also, we don't want to re-feed future versions of ChatGPT its own non-working code...

Perhaps someone is able to help on what's left above - but feel free to add to the problem description.

eagerahk
Posts: 122
Joined: 02 Dec 2015, 06:27

Re: To invoke explorer to bring up a folder with cursor stay at certain place  Topic is solved

Post by eagerahk » 28 Jan 2023, 18:59

Sorry, I finally figure it out.

Code: Select all

xx := "D:\xxx\file2.xls"
cmd := "explorer /select," xx
Run, %cmd%
The code works.

Post Reply

Return to “Ask for Help (v1)”