pass on filename as parameter?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
joshatt
Posts: 151
Joined: 07 Dec 2014, 08:41

pass on filename as parameter?

21 Jun 2017, 03:43

Hi,
I want to write a code, guessing it may be only 1 or 2 lines, but I just don't know how to do it.
I want to compile it into an exe. There's a software, it has an function to run this exe while sending some photo file's filename(including path) to this exe, then this exe will pass the photo file on to (and run) Photoshop.exe.
Of course this software can send the photo file directly to photoshop, but there's a bug about filename encoding, so that's my purpose here to introduce a middle tool.

Is it possible? Please help me.
Guest

Re: pass on filename as parameter?

25 Jun 2017, 04:43

So you select some files (in explorer I assume), then want to send those to your compiled autohotkey script and the script passed them on to Photoshop?

Selected files to script:
See "Script Parameters" here https://autohotkey.com/docs/Scripts.htm#cmd so you can call your "script.exe file1 file2 etc"
Google the forum on how to get a list of selected files in Explorer (tip: just look at the clipboard page for the easiest method as it is simply ^c and parse the clipboard)

Now you have them in your script as variables, you can now pass these on to photoshop using:
- the run command run photoshop %file1%
- perhaps drag & drop - see code by nimda https://autohotkey.com/board/topic/7914 ... ntry502676
joshatt
Posts: 151
Joined: 07 Dec 2014, 08:41

Re: pass on filename as parameter?

25 Jun 2017, 06:40

Guest wrote:So you select some files (in explorer I assume), then want to send those to your compiled autohotkey script and the script passed them on to Photoshop?

Selected files to script:
See "Script Parameters" here https://autohotkey.com/docs/Scripts.htm#cmd so you can call your "script.exe file1 file2 etc"
Google the forum on how to get a list of selected files in Explorer (tip: just look at the clipboard page for the easiest method as it is simply ^c and parse the clipboard)

Now you have them in your script as variables, you can now pass these on to photoshop using:
- the run command run photoshop %file1%
- perhaps drag & drop - see code by nimda https://autohotkey.com/board/topic/7914 ... ntry502676
Thanks a lot! I appreciate it. I'll take some time to learn.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, hiahkforum, jchestnut, mcd, Sem552 and 136 guests