Skip to content

Commit

Permalink
[nsis script runner] add !sleep, add !openmax/!openmin/!openhide for …
Browse files Browse the repository at this point in the history
…setting windows placement, and !openarg/!openargmax/!openargmin/!openarghide for optional arguments
  • Loading branch information
roytam1 committed Oct 26, 2024
1 parent 574f604 commit a4c7f4e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions nsis script runner/shellrunner.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ Function processLine
Var /GLOBAL arg0
Var /GLOBAL arg1
Var /GLOBAL arg0len
Var /GLOBAL arg2
Var /GLOBAL arg1len

Pop $0
${StrRep} $line "$0" "$\r" ""
Expand Down Expand Up @@ -374,6 +376,9 @@ Function processLine

${fillArgv} $arg1

StrLen $arg1len "$argv0 "
StrCpy $arg2 "$arg1" "" $arg1len

${If} $argvc > 0
${StrRep} $argv0 "$argv0" "$$empty" ""
${EndIf}
Expand Down Expand Up @@ -417,6 +422,9 @@ Function processLine
${Case} '!exec'
Exec "$arg1"
${Break}
${Case} '!sleep'
Sleep "$arg1"
${Break}
${Case} '!msgbox'
MessageBox MB_OK "$arg1"
${Break}
Expand Down Expand Up @@ -460,6 +468,27 @@ Function processLine
${Case} '!open'
ExecShell "open" "$arg1"
${Break}
${Case} '!openmax'
ExecShell "open" "$arg1" SW_SHOWMAXIMIZED
${Break}
${Case} '!openmin'
ExecShell "open" "$arg1" SW_SHOWMINIMIZED
${Break}
${Case} '!openhide'
ExecShell "open" "$arg1" SW_HIDE
${Break}
${Case} '!openarg'
ExecShell "open" "$argv0" "$arg2"
${Break}
${Case} '!openargmax'
ExecShell "open" "$argv0" "$arg2" SW_SHOWMAXIMIZED
${Break}
${Case} '!openargmin'
ExecShell "open" "$argv0" "$arg2" SW_SHOWMINIMIZED
${Break}
${Case} '!openarghide'
ExecShell "open" "$argv0" "$arg2" SW_HIDE
${Break}
${Case} '!regdll'
RegDLL "$arg1"
${Break}
Expand Down

0 comments on commit a4c7f4e

Please sign in to comment.