I need help opening a script using another script with a GUI. Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
LAPIII
Posts: 668
Joined: 01 Aug 2021, 06:01

I need help opening a script using another script with a GUI.

Post by LAPIII » 05 Oct 2022, 13:52

Here is what I have:

Code: Select all

#SingleInstance, Force
Path = C:\Users\LPIII\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Gui, Add, Text, gLink1, Link #1

Link1:
Run, Upload Image.ahk, %vPath%
return


Rohwedder
Posts: 7610
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: I need help opening a script using another script with a GUI.

Post by Rohwedder » 12 Oct 2022, 01:56

Hallo,
try:

Code: Select all

#SingleInstance, Force
Path = C:\Users\LPIII\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Gui, Add, Text, gLink1, Link #1
Gui, Show
Return
Link1:
Run, Upload Image.ahk, %Path%
return

LAPIII
Posts: 668
Joined: 01 Aug 2021, 06:01

Re: I need help opening a script using another script with a GUI.

Post by LAPIII » 12 Oct 2022, 14:02

Thank you, the path didn't work so I taped it to the path to my folder with shortcuts and it worked. Do you know why?

I also can't explain why if, in line 3, I change Link1 to PostImages like so:

Code: Select all

#SingleInstance, Force
Path = C:\Users\LPIII\Desktop\In Startup Folder
Gui, Add, Text, gLink1, PostImages
Gui, Show
Return
Link1:
Run, Upload Image.ahk, %vPath%
Return

I get:


TEST.ahk 13-10-2022 12⦂01⦂27⦂519 AM.jpg
TEST.ahk 13-10-2022 12⦂01⦂27⦂519 AM.jpg (31.67 KiB) Viewed 286 times

Rohwedder
Posts: 7610
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: I need help opening a script using another script with a GUI.

Post by Rohwedder » 13 Oct 2022, 00:52

Which path is right, you have to know! But why don't you try my correction?:

Code: Select all

Run, Upload Image.ahk, %Path%

LAPIII
Posts: 668
Joined: 01 Aug 2021, 06:01

Re: I need help opening a script using another script with a GUI.  Topic is solved

Post by LAPIII » 13 Oct 2022, 09:21

Thank you very much @Rohwedder. I completely missed that correction.

Post Reply

Return to “Ask for Help (v1)”