Made the "remote control" support multiple lines.

This commit is contained in:
joten 2015-02-12 19:36:52 +01:00
parent 09cb11337e
commit 9b247a40be
3 changed files with 36 additions and 7 deletions

View File

@ -23,13 +23,29 @@ the list.
is accessible by cklickig on `#!` on the right end of the bug.n bar. is accessible by cklickig on `#!` on the right end of the bug.n bar.
You may also send commands to bug.n from another AutoHotkey script. The sent You may also send commands to bug.n from another AutoHotkey script. The sent
string is interpreted and executed by bug.n either as a bug.n-function (as used string is interpreted and executed by bug.n as one or more (separated by the
in the hotkey configuration), the `Run` or `Send` command of AutoHotkey. For newline character ``n`) either bug.n-functions (as used in the hotkey
example, you may use the following lines in an AutoHotkey script: configuration) or AutoHotkey-commands (only `Run` or `Send`). For example, you
may use the following lines in an AutoHotkey script:
;; The following line is required.
DetectHiddenWindows, On DetectHiddenWindows, On
;; ControlSetText, Edit2, % "<function name>(<comma separated list of arguments>)", bug.n_BAR_0
ControlSetText, Edit2, % "Monitor_activateView(4)", bug.n_BAR_0 ;; Syntax:
;; ControlSetText, Edit2, % "<function name>(<arguments>)", bug.n_BAR_0
;; 1st example:
;ControlSetText, Edit2, % "Monitor_activateView(4)", bug.n_BAR_0
;; 2nd example:
;ControlSetText, Edit2, % "Monitor_activateView(4)`nView_setLayout(3)", bug.n_BAR_0
;; 3rd example:
ControlSetText, Edit2, % "Monitor_activateView(4)`nRun, explorer.exe", bug.n_BAR_0
It might be necessary to put a `Sleep, <delay in milliseconds>`, e. g.
`Sleep, 200`, between to consecutive `ControlSetText` to give bug.n time to
recognize the next command.
### Concepts ### Concepts

View File

@ -207,7 +207,8 @@ Bar_cmdGuiEnter:
} Else If (A_GuiControl = "Bar_#0_#1") { } Else If (A_GuiControl = "Bar_#0_#1") {
Gui, Submit, NoHide Gui, Submit, NoHide
Debug_logMessage("DEBUG[6] Bar_cmdGuiEnter; command: " . Bar_#0_#1, 6) Debug_logMessage("DEBUG[6] Bar_cmdGuiEnter; command: " . Bar_#0_#1, 6)
Main_evalCommand(Bar_#0_#1) Loop, Parse, Bar_#0_#1, `n, `r
Main_evalCommand(A_LoopField)
} }
Return Return

View File

@ -1,4 +1,16 @@
;; Just use this to send commands ;; Just use this to send commands
;; The following line is required.
DetectHiddenWindows, On DetectHiddenWindows, On
;; Syntax:
;; ControlSetText, Edit2, % "<function name>(<arguments>)", bug.n_BAR_0 ;; ControlSetText, Edit2, % "<function name>(<arguments>)", bug.n_BAR_0
ControlSetText, Edit2, % "Monitor_activateView(4)", bug.n_BAR_0
;; 1st example:
;ControlSetText, Edit2, % "Monitor_activateView(4)", bug.n_BAR_0
;; 2nd example:
;ControlSetText, Edit2, % "Monitor_activateView(4)`nView_setLayout(3)", bug.n_BAR_0
;; 3rd example:
ControlSetText, Edit2, % "Monitor_activateView(4)`nRun, explorer.exe", bug.n_BAR_0