I have a video encoder dos command line called NvenCC64.exe
I wrote a autohotkey to browse a video and call this command line encoder for video encoding
It looks like
i use following ahk command to call the encoder
RunWait, %encoder%
where the variable encoder is a full command line and arugments, something like
encoder := cmdline . trim . vfr . cmdopts . sourcefile . videocodec . targetfile
How to set title command line windows title when it is running ? but now just display the command line exe shown on the screenshot
How to set a dos command line windows title ?
Re: How to set a dos command line windows title ?
Use WinSetTitle, like so:
WinSetTitle, ahk_exe NVEncC64.exe,, This is the new title
Make sure that the script is running as admin if NVEncC64.exe is running as admin.
WinSetTitle, ahk_exe NVEncC64.exe,, This is the new title
Make sure that the script is running as admin if NVEncC64.exe is running as admin.
Re: How to set a dos command line windows title ?
Alternatively, you could use the DOS Title command in the DOS script.
Last edited by TAC109 on 26 Apr 2019, 18:32, edited 1 time in total.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
Re: How to set a dos command line windows title ?
I'm sorry. it was not working. Nothing changed on the titleOsprey wrote: ↑25 Apr 2019, 19:44Use WinSetTitle, like so:
WinSetTitle, ahk_exe NVEncC64.exe,, This is the new title
Make sure that the script is running as admin if NVEncC64.exe is running as admin.
Re: How to set a dos command line windows title ?
It worked for me when I tested with diskpart.exe (I tried with NVEncC64.exe, but it complained that I don't have an Nvidia library installed). As I mentioned, are you running the script with the same credentials as the program (i.e. as administrator if the program is being run as admin)? If so, try running the script with AutoHotkeyU64.exe.
If nothing works, you could simply try WinSetTitle, ahk_exe cmd.exe,, This is the new title, though that could apply to the wrong command window if you have more than one open.
Re: How to set a dos command line windows title ?
the script is not running as admin
Re: How to set a dos command line windows title ?
What’s in your 'cmdline' variable? You may be able to add title My New Title & to the beginning of this variable. (The & chains 2 Dos commands together.)
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
Re: How to set a dos command line windows title ?
DOS test with > youtube-dl -U ( remove/replace this command in variable e4x )
Result :
Code: Select all
;- DOS_Example with Title ( see Title alone when DOS-commands finished )
;- example : updates youtube-dl.exe > "youtube-dl -U"
#warn
setworkingdir,%a_scriptdir%
SetKeyDelay,20,20
wa:=a_screenwidth
ha:=a_screenheight
W :=(wa*50)/100 ;- width
H :=(ha*92)/100 ;- height
title2=DOS_TEST
e4x=
(Ltrim join&
@echo off
title %title2%
mode con lines=4000 cols=120
echo date=
date /t
echo time=
time /t
ver
youtube-dl -U
)
run, %comspec% /T:0A /k %e4x%,,,pid2
WinWait, ahk_pid %pid2%
WinMove, ahk_pid %pid2%, ,1,1,%w%,%h% ;- move DOS to the right position
;sleep,1000
;controlsend,,youtube-dl -U`r,ahk_pid %pid2%
;- or :
;clipboard=youtube-dl -U
;send,^v`r
return
;================================================
Code: Select all
date=
30.04.2019
time=
16:52
Microsoft Windows [Version 10.0.17763.437]
youtube-dl is up-to-date (2019.04.30)
Who is online
Users browsing this forum: roysubs and 283 guests