Tech Support Guy banner
Status
Not open for further replies.
1 - 5 of 5 Posts

·
Registered
Joined
·
344 Posts
Discussion Starter · #1 ·
For some reason my batch file will not pass the lines
Code:
"D:\Users\Josh\Desktop\Josh's Documents\Computers\Misc\Common AutoHotkey Shortcuts\PS Create Shadow.ahk"
or
Code:
"C:\Programs\Adobe\Adobe Photoshop CS5\Photoshop.exe"
until these applications are closed. This is completely useless as the whole point of the batch file is to open these programs simultaneously. The whole thing is really simple and I am at a beginner's level to it all. The file is:
Code:
"D:\Users\Josh\Desktop\Josh's Documents\Computers\Misc\Common AutoHotkey Shortcuts\PS Create Shadow.ahk"
"C:\Programs\Adobe\Adobe Photoshop CS5\Photoshop.exe"
close
 

·
Registered
Joined
·
619 Posts
You can't do multiple program opening command lines without giving it some help getting over the inherent pause. Here's what I use for starting up multiple programs:

Code:
::Use the following script to open multiple programs from a batch file.
:: Substituting your own desired software path commands.
:: This batch must be located on a PATH location to work properly.
::The START command overcomes the pause that occurs when opening
::programs with a simple command line.
::The double quotes ("") makes it possible to use a command path that
::requires enclosure in quotes without confusing the START command
::and having it treat it as the "title" switch for the command.
::The CHOICE command provides a time delay between commands.
::Delete it if not needed or add higher amount to the number to get more
::seconds delay.  The ÿ character is made by holding alt and keying 0255
::on the numeric keypad, then releasing the alt key.
::XP does not have the CHOICE command but you can get it from an older
::version of Windows or download it from the Internet for free.  Place it in
::the System32 folder.
::
START "" "C:\Program Files\Microsoft Office\Office\WINWORD.EXE"
CHOICE /c:ÿ /t:ÿ,5 /n
START "" "C:\Documents and Settings\Owner\My Documents\Qpw\TIMELINE.WB2"
CHOICE /c:ÿ /t:ÿ,5 /n
START "" "C:\Program Files\Microsoft Works\WksWP.exe"
You can modify that scropt as needed to fit your requirements.
 

·
Registered
Joined
·
1,852 Posts
This is the intended behaviour, allowing you to call outside programs or procedures sequentially.

Try adding the START command:
Code:
START "D:\Users\Josh\Desktop\Josh's Documents\Computers\Misc\Common AutoHotkey Shortcuts\PS Create Shadow.ahk"
START "C:\Programs\Adobe\Adobe Photoshop CS5\Photoshop.exe"
Type HELP START at a command line for a list of parameters.
 

·
Registered
Joined
·
344 Posts
Discussion Starter · #4 ·
You can't do multiple program opening command lines without giving it some help getting over the inherent pause. Here's what I use for starting up multiple programs:

Code:
::Use the following script to open multiple programs from a batch file.
:: Substituting your own desired software path commands.
:: This batch must be located on a PATH location to work properly.
::The START command overcomes the pause that occurs when opening
::programs with a simple command line.
::The double quotes ("") makes it possible to use a command path that
::requires enclosure in quotes without confusing the START command
::and having it treat it as the "title" switch for the command.
::The CHOICE command provides a time delay between commands.
::Delete it if not needed or add higher amount to the number to get more
::seconds delay.  The ÿ character is made by holding alt and keying 0255
::on the numeric keypad, then releasing the alt key.
::XP does not have the CHOICE command but you can get it from an older
::version of Windows or download it from the Internet for free.  Place it in
::the System32 folder.
::
START "" "C:\Program Files\Microsoft Office\Office\WINWORD.EXE"
CHOICE /c:ÿ /t:ÿ,5 /n
START "" "C:\Documents and Settings\Owner\My Documents\Qpw\TIMELINE.WB2"
CHOICE /c:ÿ /t:ÿ,5 /n
START "" "C:\Program Files\Microsoft Works\WksWP.exe"
You can modify that scropt as needed to fit your requirements.
okay, your way seemed unnecessarily complicated as simply
START "" "C:\Program Files\Microsoft Office\Office\WINWORD.EXE"
on each program worked for me fine. Thanks a lot!
 

·
Registered
Joined
·
619 Posts
I agree, the version I posted is more complex but you may yet find use for it upon occasion. It is able to handle some direct access problems that involve file association startups that the simpler version can't handle.

Thanks for the feedback.
 
1 - 5 of 5 Posts
Status
Not open for further replies.
Top