Skip to content

Commit

Permalink
try fix fredo conemu input
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-SF committed Jan 9, 2018
1 parent 4fe9d1e commit 286fe5e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
25 changes: 17 additions & 8 deletions script_helper.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,14 @@ inipath := A_AppData "\script_helper\"
FileCreateDir, %inipath%
SetWorkingDir, %inipath%
inifile := "optionsv2.ini"
FileDelete, %A_Temp%\cversion.txt
fileinstall, version.txt, %A_Temp%\cversion.txt
githubversiontxt := "https://raw.githubusercontent.com/Martin-SF/script_helper_by_Peter_Holz/master/version.txt"

settingsread()
check_updates(githubversiontxt)
return

*^1::
run, %inipath%
return

check_updates(verurl) {
URLDownloadToFile, %verurl% , %A_Temp%\version.txt
IniRead, dwnv , %A_Temp%\version.txt , version, version
Expand All @@ -65,7 +62,11 @@ GuiClose:
Hotkey, ~f5, on
return

^4::
*^1::
run, % inipath . "\" . inifile
return

^2::
ListVars
return

Expand Down Expand Up @@ -217,7 +218,7 @@ get_scripttype(scriptname) {
open_c(programexe, programpathexe, path := "") {

;programme starparam übergeben : path
global conemu_ms
global conemu_ms, send_ms
p := 0
newstarted := 0

Expand Down Expand Up @@ -251,7 +252,7 @@ open_c(programexe, programpathexe, path := "") {

WinActivate, ahk_exe %programexe% ;TIMEOUTS
WinWaitActive, ahk_exe %programexe%
sleep 10
sleep send_ms
if (newstarted = 0 and p = 1) {
clearconsole()
}
Expand Down Expand Up @@ -302,6 +303,7 @@ write_std_settings(n) {
global inifile

std_shortcut_waittime := 100
std_send_ms := 50
std_conemu_waittime := 5000
std_clearmethod := 1
std_conemupathexe := "C:\Program Files\ConEmu\ConEmu64.exe"
Expand All @@ -317,10 +319,13 @@ write_std_settings(n) {
iniwrite, %std_sumatrapathexe%, %inifile%, settings, SumatraPDF_path_exe
if (n=5 or n=0)
iniwrite, %std_clearmethod%, %inifile%, settings, clearing_method_in_conemu
if (n=6 or n=0)
iniwrite, %std_send_ms%, %inifile%, settings, wait_for_conemu_input_in_ms
settingsread()
}

settingsread() {
global conemupathexe, sumatrapathexe, shortcut_ms, conemu_ms, inifile, clearmethod
global conemupathexe, sumatrapathexe, shortcut_ms, conemu_ms, inifile, clearmethod, send_ms

if !FileExist(inifile)
write_std_settings(0)
Expand All @@ -345,6 +350,10 @@ settingsread() {
if (clearmethod = "ERROR")
write_std_settings(5)

iniread, send_ms, %inifile% ,settings , wait_for_conemu_input_in_ms
if (send_ms = "ERROR")
write_std_settings(6)

}

check_program_availability() {
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[version]
version = v1.0-beta_3.0.5.2
version = v1.0-beta_3.0.5.3

0 comments on commit 286fe5e

Please sign in to comment.