mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-23 00:13:36 +01:00
Update export-scripts2serenade.ps1
This commit is contained in:
parent
989ddd6a38
commit
1e20cb74ce
@ -24,11 +24,12 @@ try {
|
|||||||
"/* Exported by export-scripts2serenade.ps1 */" > $TargetFile
|
"/* Exported by export-scripts2serenade.ps1 */" > $TargetFile
|
||||||
foreach ($Script in $Scripts) {
|
foreach ($Script in $Scripts) {
|
||||||
$ScriptName = $Script.basename
|
$ScriptName = $Script.basename
|
||||||
|
$Keyword = $ScriptName -replace "-"," "
|
||||||
"" >> $TargetFile
|
"" >> $TargetFile
|
||||||
"serenade.global().command(\"$ScriptName\", async (api) => {" >> $TargetFile
|
"serenade.global().command(`"$Keyword`", async (api) => {" >> $TargetFile
|
||||||
"await api.focusOrLaunchApplication(\"terminal\");" >> $TargetFile
|
"await api.focusOrLaunchApplication(`"terminal`");" >> $TargetFile
|
||||||
"await api.typeText(\"$Script\");" >> $TargetFile
|
"await api.typeText(`"$ScriptName.ps1`");" >> $TargetFile
|
||||||
"await api.pressKey(\"return\");" >> $TargetFile
|
"await api.pressKey(`"return`");" >> $TargetFile
|
||||||
"});" >> $TargetFile
|
"});" >> $TargetFile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user