EXE Won't Run - Need to Run at Windows (7) StartUp.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Howard Christian
Posts: 6
Joined: 28 May 2017, 10:39

EXE Won't Run - Need to Run at Windows (7) StartUp.

28 May 2017, 11:08


Re EXE Won't Run, need a little help please.
I have created a Macro in Pulover's Macro Creator. It is very short only a few lines.
It runs flawlessly when run from within the MACRO or the External Macro Control Bar.

I need to run it on Windows StartUp so I created an EXE file from FILE > EXPORT to AHK.
(I have downloaded & installed the Auto Hot Key program).

In the export I have the option to create an EXE program, which it did create without any errors.

However, when I execute it, nothing happens EXCEPT that it puts a H on the Task Bar.
I am logged in as Administrator & I've tried running the EXE as Administrator also but nothing at all seems to help.

If I Right Click on the H it has three options:
SUSPEND HOTKEYS
PAUSE SCRIPT
EXIT

Double Clicking the H does nothing either.
OS: Windows 7, SP1 64bit.

Please can anyone help, I have looked thru' the Forum but not really found anything to help.
I am not a Computer Code Guru, just an average Windows user so Technical talk may throw me a bit.

Thanks in advance
Howard.
User avatar
Blackholyman
Posts: 1293
Joined: 29 Sep 2013, 22:57
Location: Denmark
Contact:

Re: EXE Won't Run - Need to Run at Windows (7) StartUp.

29 May 2017, 03:21

hi

try and post the AHK code then one you get when you export from PMC so you can help
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:
Howard Christian
Posts: 6
Joined: 28 May 2017, 10:39

Re: EXE Won't Run - Need to Run at Windows (7) StartUp.

29 May 2017, 03:59

This is the AHK Script.

; This script was created using Pulover's Macro Creator
; www.macrocreator.com

#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Screen
SendMode Input
#SingleInstance Force
SetTitleMatchMode 2
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1


#F3::
Macro1:
Run, F:\ServInfo\servinfo\servinfo\ServInfo.exe
Sleep, 20000
WinMove, ServInfo 2.02,, 1281, 12, 800, 600
Sleep, 333
Sleep, 1000
WinActivate, Program Manager ahk_class Progman
Sleep, 333
Sleep, 2453
Sleep, 10000
Run, F:\Sim-Avionics\Dispatcher_Console\Dispatcher.exe
Sleep, 10000
Run, C:\Users\PC9\AppData\Local\vPilot\vPilot.exe -remote -voice
Sleep, 10000
Run, C:\Program Files (x86)\LiteManager Pro - Viewer\ROMViewer.exe
Sleep, 10000
WinMove, LiteManager Free - Viewer - Free version of LiteManager,, 1281, 12, 800, 600
Sleep, 333
Run, C:\Program Files (x86)\Dual Monitor\DualMonitor.exe
Return


/*
PMC File Version 5.0.5
---[Do not edit anything in this section]---

[PMC Code v5.0.5]|#F3||1|Screen,2,Fast,1,1,Input,-1,-1,1|1|Macro1
1|Run|F:\ServInfo\servinfo\servinfo\ServInfo.exe|1|0|Run|||||
2|[Pause]||1|20000|Sleep|||||
3|WinMove|1281, 12, 800, 600|1|333|WinMove||ServInfo 2.02|||
4|[Pause]||1|1000|Sleep|||||
5|WinActivate||1|333|WinActivate||Program Manager ahk_class Progman|||
6|[Pause]||1|2453|Sleep|||||
7|[Pause]||1|10000|Sleep|||||
8|Run|F:\Sim-Avionics\Dispatcher_Console\Dispatcher.exe|1|0|Run|||||
9|[Pause]||1|10000|Sleep|||||
10|Run|C:\Users\PC9\AppData\Local\vPilot\vPilot.exe -remote -voice|1|0|Run|||||
11|[Pause]||1|10000|Sleep|||||
12|Run|C:\Program Files (x86)\LiteManager Pro - Viewer\ROMViewer.exe|1|0|Run|||||
13|[Pause]||1|10000|Sleep|||||
14|WinMove|1281, 12, 800, 600|1|333|WinMove||LiteManager Free - Viewer - Free version of LiteManager|||
15|Run|C:\Program Files (x86)\Dual Monitor\DualMonitor.exe|1|0|Run|||||

*/
User avatar
Blackholyman
Posts: 1293
Joined: 29 Sep 2013, 22:57
Location: Denmark
Contact:

Re: EXE Won't Run - Need to Run at Windows (7) StartUp.

29 May 2017, 12:48

This Line #F3:: is a hotkey aka win+f3 to start the script so you execute it and Them need to Press win+f3 for it to do anything
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:
Howard Christian
Posts: 6
Joined: 28 May 2017, 10:39

Re: EXE Won't Run - Need to Run at Windows (7) StartUp.

03 Jun 2017, 07:59

I don't understand. Am I meant to insert a line at the beginning of the script that is #F3::
Ie:
#F3::
Run, F:\ServInfo\servinfo\servinfo\ServInfo.exe

I can't work out how to insert it, if that's what I'm meant to do?

And after I've created the exe do I then press Win+F3 to execute it?
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: EXE Won't Run - Need to Run at Windows (7) StartUp.

03 Jun 2017, 08:07

Code: Select all

#F3::Run, F:\ServInfo\servinfo\servinfo\ServInfo.exe ; press (the hotkey AKA keyboard shortcut) Win+F3 to run ServInfo.exe
And after I've created the exe do I then press Win+F3 to execute it?
Exactly because you made that hotkey part of your script. So pressing Win+F3 will fire that hotkey.
Howard Christian
Posts: 6
Joined: 28 May 2017, 10:39

Re: EXE Won't Run - Need to Run at Windows (7) StartUp.

03 Jun 2017, 08:55

Or is there a way to add F3 Command to execute in the marco?
Howard Christian
Posts: 6
Joined: 28 May 2017, 10:39

Re: EXE Won't Run - Need to Run at Windows (7) StartUp.

03 Jun 2017, 09:54

One thing I did try & it seemed to work but I can't replicate it again...
In the Macro I added just the Character x to a Raw Text to the end of the Macro.
Then in the AHK Create EXE I changed the Hotekey from F3 to x
Then after I created the exe & ran it, it executed immediately.

But I tried to create the same again but can't replicate it.
In the AHK Window there are TWO FIELDS to enter a HotKey. I've tried putting my x into both but I can still only execute the exe after I press the x key myself.
I nee the exe to execute immediately I run it.
Howard Christian
Posts: 6
Joined: 28 May 2017, 10:39

Re: EXE Won't Run - Need to Run at Windows (7) StartUp.

04 Jun 2017, 05:12

Ok, so I understand now the Hot key but can someone please tell me how can I make the ServInfo.exe EXECUTE on Boot Up?

How can I simulate pressing the Win+F or any other Key Press on system Boot Up?
nomad92
Posts: 8
Joined: 08 May 2017, 07:28

Re: EXE Won't Run - Need to Run at Windows (7) StartUp.

04 Jun 2017, 10:17

Remove the hotkey part from your script, and leave it as Run, F:\ServInfo\servinfo\servinfo\ServInfo.exe. Place that in your Startup folder, it should then in theory autorun the script and then the script will run ServInfo.exe

EDIT: Decidied to test it myself, using this command Run ::{20d04fe0-3aea-1069-a2d8-08002b30309d} which basically opens My PC window. It runs it at startup without any input then quits.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 207 guests