Skip to content

Commit

Permalink
faster launch, minimal change in open_c
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-SF authored Oct 26, 2017
1 parent c50b64b commit 7015495
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions atom_latex_autorun.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ run_line() {

StringReplace, scriptpath, scriptpath, :, , All
scriptpath := "/" + scriptpath
;error wenn fenster gewechselt wurde
if (WinGetActiveTitle() != scriptpath) ;FRAGEN OB WECHSELN ODER NICHT?
SendInput cd "%scriptpath%"{enter} ;nur wenn im title von conemu nicht ath steht ;scriptname := % """" scriptpath "/" scriptname """"

scripttype := get_scripttype(scriptname)
SendInput %scripttype% %scriptname%{enter}
SendInput %scripttype% %scriptname%{enter} ;eventl diesen befehl beim starten von conemu als parameter übergeben
}
WinGetActiveTitle() {
WinGetActiveTitle, out
Expand Down Expand Up @@ -121,7 +122,7 @@ open_c(program,path) {

global ;programme starparam übergeben : path

SetWorkingDir, %path%
;SetWorkingDir, %path%

if (program = "conemu") {
programexe := conemuexe
Expand All @@ -137,7 +138,7 @@ open_c(program,path) {

process, exist, %programexe%
if (errorlevel=0) {
run, %programpathexe%
run, %programpathexe%, %path%
WinWaitActive, ahk_exe %programexe%

if (program = "conemu") {
Expand All @@ -155,8 +156,8 @@ open_c(program,path) {

WinActivate, ahk_exe %programexe% ;TIMEOUTS
WinWaitActive, ahk_exe %programexe%
sleep 100 ;custom sleep für ini
SetWorkingDir %A_ScriptDir%
;sleep 100 ;custom sleep für ini
;SetWorkingDir %A_ScriptDir%
}

get_scriptfullpath_atom() {
Expand Down

0 comments on commit 7015495

Please sign in to comment.