Skip to content

Commit

Permalink
patch issue 34
Browse files Browse the repository at this point in the history
  • Loading branch information
hessandrew committed Mar 15, 2023
1 parent 0310fd1 commit a8f326a
Show file tree
Hide file tree
Showing 27 changed files with 568 additions and 514 deletions.
6 changes: 6 additions & 0 deletions clawPDF.Core/Actions/ScriptAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ public ActionResult ProcessJob(IJob job)
try
{
Logger.Debug("Launching script...");

if (job.Profile.Scripting.HideProcess)
{
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
}

proc.Start();

if (job.Profile.Scripting.WaitForScript)
Expand Down
19 changes: 19 additions & 0 deletions clawPDF.Settings/Scripting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,18 @@ public Scripting()
/// </summary>
public bool WaitForScript { get; set; }

/// <summary>
/// Hide the process execution
/// </summary>
public bool HideProcess { get; set; }

private void Init()
{
Enabled = false;
ParameterString = "";
ScriptFile = "";
WaitForScript = true;
HideProcess = true;
}

public void ReadValues(Data data, string path)
Expand Down Expand Up @@ -87,6 +93,15 @@ public void ReadValues(Data data, string path)
{
WaitForScript = true;
}

try
{
HideProcess = bool.Parse(data.GetValue(@"" + path + @"HideProcess"));
}
catch
{
HideProcess = true;
}
}

public void StoreValues(Data data, string path)
Expand All @@ -95,6 +110,7 @@ public void StoreValues(Data data, string path)
data.SetValue(@"" + path + @"ParameterString", Data.EscapeString(ParameterString));
data.SetValue(@"" + path + @"ScriptFile", Data.EscapeString(ScriptFile));
data.SetValue(@"" + path + @"WaitForScript", WaitForScript.ToString());
data.SetValue(@"" + path + @"HideProcess", HideProcess.ToString());
}

public Scripting Copy()
Expand All @@ -105,6 +121,7 @@ public Scripting Copy()
copy.ParameterString = ParameterString;
copy.ScriptFile = ScriptFile;
copy.WaitForScript = WaitForScript;
copy.HideProcess = HideProcess;

return copy;
}
Expand All @@ -118,6 +135,7 @@ public override bool Equals(object o)
if (!ParameterString.Equals(v.ParameterString)) return false;
if (!ScriptFile.Equals(v.ScriptFile)) return false;
if (!WaitForScript.Equals(v.WaitForScript)) return false;
if (!HideProcess.Equals(v.HideProcess)) return false;

return true;
}
Expand All @@ -130,6 +148,7 @@ public override string ToString()
sb.AppendLine("ParameterString=" + ParameterString);
sb.AppendLine("ScriptFile=" + ScriptFile);
sb.AppendLine("WaitForScript=" + WaitForScript);
sb.AppendLine("HideProcess=" + HideProcess);

return sb.ToString();
}
Expand Down
1,031 changes: 517 additions & 514 deletions clawPDF.Settings/settings.xml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions clawPDF.Shared/Views/ActionControls/ScriptActionControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,8 @@
<CheckBox IsChecked="{Binding CurrentProfile.Scripting.WaitForScript}" Margin="0 10 0 0">
<TextBlock Name="WaitForScript" TextWrapping="Wrap">Wait until the script execution has ended</TextBlock>
</CheckBox>
<CheckBox IsChecked="{Binding CurrentProfile.Scripting.HideProcess}" Margin="0 10 0 0">
<TextBlock Name="HideProcess" TextWrapping="Wrap">Hide the process execution</TextBlock>
</CheckBox>
</StackPanel>
</actionControls:ActionControl>
1 change: 1 addition & 0 deletions clawPDF/languages/Catalan (Catalan).ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=Afegeix l'identificador:
ScriptCallPreviewText.Text=Vista Prèvia Script:
ScriptFileText.Text=Fitxer script:
WaitForScript.Text=Espereu fins que l'execució de l'script hagi acabat
HideProcess.Text=Amaga l'execució del procés

[ScriptActionSettings]
AllFiles=Tots els fitxers
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Catalan (Valencian).ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=Afig l'identificador:
ScriptCallPreviewText.Text=Vista Prèvia Script:
ScriptFileText.Text=Fitxer script:
WaitForScript.Text=Espereu fins que l'execució de l'script haja acabat
HideProcess.Text=Amaga l'execució del procés
[ScriptActionSettings]
AllFiles=Tots els fitxers
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Chinese (Simplified).ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=新增标记:
ScriptCallPreviewText.Text=脚本调用预览:
ScriptFileText.Text=脚本文件:
WaitForScript.Text=直到脚本执行结束
HideProcess.Text=隐藏进程执行

[ScriptActionSettings]
AllFiles=所有文件
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Chinese (Traditional).ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=新增標記:
ScriptCallPreviewText.Text=呼叫指令碼預覽:
ScriptFileText.Text=指令碼檔:
WaitForScript.Text=直到指令碼執行結束
HideProcess.Text=隱藏進程執行

[ScriptActionSettings]
AllFiles=所有檔案
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Corsican (France).ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=Aghjunghje una Marca :
ScriptCallPreviewText.Text=Avvistu di Chjama Script :
ScriptFileText.Text=Schedariu di Script :
WaitForScript.Text=Aspittate chì l'esecuzione di u script sia compia
HideProcess.Text=Masquer l'exécution du processus
[ScriptActionSettings]
AllFiles=Tutti i schedarii
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Czech.ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=Přidej vlákno:
ScriptCallPreviewText.Text=Náhled volání skriptu
ScriptFileText.Text=Soubor se skriptem
WaitForScript.Text=Počkej, až běžící skript skončí.
HideProcess.Text=Skrýt provádění procesu

[ScriptActionSettings]
AllFiles=Všechna data
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Danish.ini
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ AddScriptTokenText.Text=Tilføj mærke:
ScriptCallPreviewText.Text=Efterse script-kald:
ScriptFileText.Text=Scriptfil:
WaitForScript.Text=Vent til udførelsen af script er slut
HideProcess.Text=Skjul procesudførelsen
[ScriptActionSettings]
AllFiles=Alle filer
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Dutch.ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=Voeg merkteken toe:
ScriptCallPreviewText.Text=Voorbeeld scriptoproep:
ScriptFileText.Text=Scriptbestand:
WaitForScript.Text=Wacht op einde uitvoeren script
HideProcess.Text=Verberg de procesuitvoering
[ScriptActionSettings]
AllFiles=Alle bestanden
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/English.ini
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ AddScriptTokenText.Text=Add Token:
ScriptCallPreviewText.Text=Script Call Preview:
ScriptFileText.Text=Script File:
WaitForScript.Text=Wait until the script execution has ended
HideProcess.Text=Hide the process execution
[ScriptActionSettings]
AllFiles=All files
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Estonian.ini
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ AddScriptTokenText.Text=Lisa juurdepääs:
ScriptCallPreviewText.Text=Skripti väljakutsumise eelvaade:
ScriptFileText.Text=Skripti fail:
WaitForScript.Text=Oota kuniks skript töö lõpetab
HideProcess.Text=Peida protsessi täitmine

[ScriptActionSettings]
AllFiles=Kõik failid
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Finnish.ini
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ AddScriptTokenText.Text=Lisää muuttuja:
ScriptCallPreviewText.Text=Komentosarjan esikatselu:
ScriptFileText.Text=Komentosarjatiedosto:
WaitForScript.Text=Odota komentosarjan suorituksen päättymistä
HideProcess.Text=Piilota prosessin suoritus

[ScriptActionSettings]
AllFiles=Kaikki tiedostot
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/French.ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=Données
ScriptCallPreviewText.Text=Aperçu :
ScriptFileText.Text=Fichier script :
WaitForScript.Text=Attendre la fin d'exécution du script
HideProcess.Text=Masquer l'exécution du processus

[ScriptActionSettings]
AllFiles=Tous les fichiers
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Gaelic (Scotland).ini
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ AddScriptTokenText.Text=Cuir tòcan ris:
ScriptCallPreviewText.Text=Ro-shealladh air gairm an sgriobt:
ScriptFileText.Text=Faidhle an sgriobt:
WaitForScript.Text=Fuirich gus an dàinig obair an sgriobt gu crìoch
HideProcess.Text=Ocultar a execución do proceso

[ScriptActionSettings]
AllFiles=Na h-uile faidhle
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/German.ini
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ AddScriptTokenText.Text=Token hinzufügen:
ScriptCallPreviewText.Text=Vorschau Skriptaufruf:
ScriptFileText.Text=Skriptdatei:
WaitForScript.Text=Warten, bis das Skript beendet wurde
HideProcess.Text=Ausblenden der Prozessausführung

[ScriptActionSettings]
AllFiles=Alle Dateien
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Hungarian.ini
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ AddScriptTokenText.Text=Tulajdonság hozzáadása:
ScriptCallPreviewText.Text=Szkript hívás előnézete:
ScriptFileText.Text=Szkript állomány:
WaitForScript.Text=Várjon amíg a szkript végrehajtásra kerül
HideProcess.Text=A folyamat végrehajtásának elrejtése

[ScriptActionSettings]
AllFiles=Minden fájl
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Italian.ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=Aggiungi Dati:
ScriptCallPreviewText.Text=Chiamata d'esempio script:
ScriptFileText.Text=File di script:
WaitForScript.Text=Attendere che l'esecuzione dello script venga terminata
HideProcess.Text=Nascondere l'esecuzione del processo
[ScriptActionSettings]
AllFiles=Tutti i file
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Lithuanian.ini
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ AddScriptTokenText.Text=Pridėti atpažinimo ženklą:
ScriptCallPreviewText.Text=Skripto kvietimo peržiūra:
ScriptFileText.Text=Skripto failas:
WaitForScript.Text=Palaukite, kol skripto vykdymas bus baigtas
HideProcess.Text=Slėpti proceso vykdymą

[ScriptActionSettings]
AllFiles=Visi failai
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Norwegian, Bokmal (Norway).ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=Legg til merke:
ScriptCallPreviewText.Text=Etterse script-kall:
ScriptFileText.Text=Scriptfil:
WaitForScript.Text=Vent til utføring av script er slutt
HideProcess.Text=Skjul prosessutførelsen
[ScriptActionSettings]
AllFiles=Alle filer
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Polish.ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=Dodaj Token:
ScriptCallPreviewText.Text=Podgląd skryptu połączenia:
ScriptFileText.Text=Plik skryptu:
WaitForScript.Text=Poczekaj na zakończenie wykonywania skryptu
HideProcess.Text=Ukryj wykonanie procesu

[ScriptActionSettings]
AllFiles=Wszystkie pliki
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Portuguese (Brazil).ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=Adicionar Token:
ScriptCallPreviewText.Text=Exibição da Chamada do Script:
ScriptFileText.Text=Arquivo do Script:
WaitForScript.Text=Aguardar a conclusão da execução do script
HideProcess.Text=Ocultar a execução do processo

[ScriptActionSettings]
AllFiles=Todos os arquivos
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Slovenian.ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=Dodaj spremenljivko:
ScriptCallPreviewText.Text=Predogled:
ScriptFileText.Text=Datoteka skripta:
WaitForScript.Text=Počakaj, da se skript izvede do konca
HideProcess.Text=Skrij izvajanje procesa

[ScriptActionSettings]
AllFiles=Vse datoteke
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Spanish.ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ AddScriptTokenText.Text=Agregar Token:
ScriptCallPreviewText.Text=Vista previa de la llamada al guión:
ScriptFileText.Text=Archivo de guión:
WaitForScript.Text=Esperar a que finalice la ejecución del guión
HideProcess.Text=Ocultar la ejecución del proceso

[ScriptActionSettings]
AllFiles=Todos los archivos
Expand Down
1 change: 1 addition & 0 deletions clawPDF/languages/Swedish.ini
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ AddScriptTokenText.Text=Lägg till Token:
ScriptCallPreviewText.Text=Förhandsgranskning av scriptanrop:
ScriptFileText.Text=Scriptfil:
WaitForScript.Text=Vänta tills scriptkörningen har avslutats.
HideProcess.Text=Dölj processexekveringen

[ScriptActionSettings]
AllFiles=Alla filer
Expand Down

0 comments on commit a8f326a

Please sign in to comment.