Page 1 of 1
manage commands - open
Posted: 05 Oct 2018 23:04
by swan_x
from manage commands - open it's possible open chrome AND one txt file? or this option it's only with "run script" ??
Re: manage commands - open
Posted: 05 Oct 2018 23:33
by highend
The latter
Re: manage commands - open
Posted: 05 Oct 2018 23:46
by jupe
Or you could create a batch file and put that in the Open section. The batch file would only need to contain just the path of the txt file and the Chrome exe path both quoted, the text file would be opened with the windows associated program, and you would get a flash of a dos box.
e.g:
"c:\path\to\text\file.txt"
"c:\path\to\chrome.exe"
I am not sure why you would do it this way, but it is a possibility if your aim is to avoid scripting, or you could do the same as a XY script and load it in the open section as a command line, if your main aim was to just get the entry in the Open section not to avoid having to script.
e.g
Code: Select all
"<xy>" /feed="::runq 'c:\path\to\text\file.txt'; runq 'c:\path\to\chrome.exe';"
Re: manage commands - open
Posted: 06 Oct 2018 09:52
by swan_x
@ jupe
yess! great! work perfectly! many tanxs
Re: manage commands - open
Posted: 06 Oct 2018 14:09
by swan_x
i have reverse the order of script to have chrome under and txt file on top.... but not work!
how to have txt file over chrome window??
Re: manage commands - open
Posted: 06 Oct 2018 16:15
by klownboy
Try putting a small wait command between the two (e.g., "wait 500;" for a half second wait). That worked for me.
Code: Select all
"<xy>" /feed="::runq 'c:\path\to\chrome.exe';wait 500;runq 'c:\path\to\text\file.txt';"
Re: manage commands - open
Posted: 06 Oct 2018 16:50
by highend
And a reliable way would be to just compile a simple .ahk script and run it together with the other tools, like:
Code: Select all
#NoEnv
#SingleInstance, Force
#Persistent
SetTimer, ActivateChrome, 50
return
ActivateChrome:
if WinExist("ahk_exe chrome.exe") {
WinActivate, ahk_exe chrome.exe
ExitApp
}
return
Re: manage commands - open
Posted: 06 Oct 2018 17:50
by swan_x
@ klownboy
simply, fast and work fine! tanxs