Page 1 of 1

How to run a script at startup minimized?

Posted: Thu Jul 13, 2017 7:50 pm
by andreaspada
Hi! I'm getting my hand at work in FreePIE. Currently, I already had produced a good script to solve my main needs for my trackball. Now, I want my script to run each time I logon and, of course, minimized.
I now I can run a script usinr /r after it. but I cannot understand how to have FreePIE minimize itself...

Thanks,
Andrea

Re: How to run a script at startup minimized?

Posted: Thu Jul 13, 2017 8:04 pm
by Commander89
Couldn't this be solved with a batch file

Re: How to run a script at startup minimized?

Posted: Fri Jul 14, 2017 9:29 am
by andreaspada
Possibly yes, however I'm quite new to Windows - I'm coming from 15 years of Linux and OSX...
I have a batch file which run freepie, open my scripts and execute it. When it launch, it opens a cmd.exe window - which can be minimized through the .lnk properties - but the FreePIE stay open.

Re: How to run a script at startup minimized?

Posted: Fri Jul 14, 2017 12:12 pm
by andreaspada
Got it. Using Autohotkey I created such a script:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Run, C:\Program Files (x86)\FreePIE\FreePIE.exe my/scripts/full/path.py /r,,Min

Re: How to run a script at startup minimized?

Posted: Fri Jul 14, 2017 2:30 pm
by Jabberwock
You can create a link from Freepie.exe, add the script parameter in the link properties and make it run minimized.