if box is checked move a file to startup Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
mshall
Posts: 21
Joined: 13 Jul 2018, 16:42

if box is checked move a file to startup

19 Jul 2018, 12:07

Hello,

I have a GUI that has some check boxes on a page. They will each do something different, but this one needs to move a file I have titled bob.lnc (it's a shortcut) to my startup folder. I have tried some variations of this, even trying FileCreateShortcut and making a new one. My original testing was done with just the message boxes, which all change on command perfectly.

Thank you for your help!

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus

mshall
Posts: 21
Joined: 13 Jul 2018, 16:42

Re: if box is checked move a file to startup  Topic is solved

19 Jul 2018, 15:51

Needed to set working dir
User avatar
gregster
Posts: 1346
Joined: 30 Sep 2013, 06:48

Re: if box is checked move a file to startup

19 Jul 2018, 16:03

If your if block contains more than one line, you will have to use {...} - indenting will not help with this.
At the moment the line FileMove, %A_WorkingDir%\bob.lnc, C:\Users\mhall\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\ will always be executed unconditionally, each time the labeled subroutine runs...
mshall
Posts: 21
Joined: 13 Jul 2018, 16:42

Re: if box is checked move a file to startup

20 Jul 2018, 08:27

I noticed that and resolved it. Good to point out for future forum searches. If anyone does have questions, I am happy to take PMs.

Here was the final code used:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Ask For Help”

Who is online

Users browsing this forum: asghar5676, dee1337, IsaacElenbaas, ivyandrei, MIRKOSOFT and 49 guests