1
0
mirror of https://github.com/ret-Phoenix/SmartConfigurator.git synced 2026-06-11 22:31:02 +02:00
Files
ret-Phoenix fbcb4151bb Оптимизировал выбор ранее набранного слова
Оптимизировал переход в основной форме
При переходе к строке снимаю выделение текущей строки
2018-09-09 21:12:03 +03:00

330 lines
7.5 KiB
AutoHotkey

actionShowMethodsList() {
RunWait, system\OneScript\bin\woscript.exe scripts\Íàâèãàöèÿ\ÍàâèãàöèÿÏîÌîäóëþ.os ÑïèñîêÌåòîäîâ
}
actionShowRegionsList() {
RunWait, system\OneScript\bin\woscript.exe scripts\Íàâèãàöèÿ\ÍàâèãàöèÿÏîÌîäóëþ.os ÑïèñîêÎáëàñòåé
}
actionShowExtFilesList() {
RunWait, system\OneScript\bin\woscript.exe scripts\ExtFiles.os,,
}
actionShowScriptManager() {
RunWait, system\OneScript\bin\woscript.exe scripts\ÌåíåäæåðÑêðèïòîâ.os,,
}
actionShowPrevWords() {
RunWait, system\OneScript\bin\woscript.exe scripts\Íàâèãàöèÿ\ÍàâèãàöèÿÏîÌîäóëþ.os allwords,,
}
actionGotoMethodBegin() {
RunWait, system\OneScript\bin\woscript.exe scripts\Íàâèãàöèÿ\ÍàâèãàöèÿÏîÌîäóëþ.os Íà÷àëîÌåòîäà
}
actionGotoMethodEnd() {
RunWait, system\OneScript\bin\woscript.exe scripts\Íàâèãàöèÿ\ÍàâèãàöèÿÏîÌîäóëþ.os ÊîíåöÌåòîäà
}
actionShowRegExSearch() {
Global
RunWait, system\OneScript\bin\woscript.exe scripts\Íàâèãàöèÿ\ÍàâèãàöèÿÏîÌîäóëþ.os RegExSearch,,Hide
if (ErrorLevel > 0) {
nStr := ErrorLevel
Sleep 1
SendInput ^%KeyG%
WinWait, Ïåðåéòè ïî íîìåðó ñòðîêè
SendInput %nStr%{ENTER}
SendInput, {home}
}
}
actionShowRegExSearchLastResult() {
Global
SendInput, {home}
RunWait, system\OneScript\bin\woscript.exe scripts\Íàâèãàöèÿ\ÍàâèãàöèÿÏîÌîäóëþ.os ÐåçóëüòàòÏîñëåäíåãîÏîèñêà,,Hide
if (ErrorLevel > 0) {
nStr := ErrorLevel
SendInput ^%KeyG%
WinWait, Ïåðåéòè ïî íîìåðó ñòðîêè
SendInput %nStr%{ENTER}
SendInput, {home}
}
}
actionShowLastSelect() {
Global
SendInput, {home}
; RunWait, wscript scripts.js null last
RunWait, system\OneScript\bin\woscript.exe scripts\Íàâèãàöèÿ\ÍàâèãàöèÿÏîÌîäóëþ.os ÏîêàçàòüÏîñëåäíèéÑïèñîêÂûáîðà,,Hide
if (ErrorLevel > 0) {
nStr := ErrorLevel
SendInput ^%KeyG%
WinWait, Ïåðåéòè ïî íîìåðó ñòðîêè
SendInput %nStr%{ENTER}
SendInput, {home}
SendInput, ^{NumpadAdd}
}
}
actionRunAuthorComments(data) {
RunWait, system\OneScript\bin\oscript.exe scripts\ÀâòîðñêèåÊîììåíòàðèè.os %data%,,hide
}
actionShowPreprocMethod() {
RunWait, system\OneScript\bin\woscript.exe scripts\ÐàáîòàÑÒåêñòîì.os ÂûáðàòüÏðåïðîöåññîð,,
}
actionShowSimpleMetaSearch() {
Global
SendInput, ^+%KeyC%
Sleep 10
SendInput ^%KeyF%
}
actionShowIncomingObjectTypes() {
Global
try {
SendInput, %KeyContextMenu%
SendInput, {UP}{UP}{UP}{ENTER}
Sleep 100
SendInput, {Enter}
; Sleep 1
SendInput, ^!%KeyO%
ActivateWindowByTitle("Ñëóæåáíûå ñîîáùåíèÿ")
SendInput, ^%KeyA%
; ClipWait
Sleep 1
putTextFromResultWindowInFile(0)
module = tmp\module.txt
RunWait, wscript scripts\scripts.js %module% gototype
;RunWait, system\OneScript\bin\oscript.exe scripts\Íàâèãàöèÿ\ÍàâèãàöèÿÏîÌåòàäàííûì.os ÏåðåéòèÊÑñûëêåÂÎáúåêòå
; MsgBox %ErrorLevel%
Sleep 1
if (ErrorLevel > 0) {
SendInput, ^{END}
UpCount := ErrorLevel
Loop %UpCount%
{
SendInput, {UP}
}
SendInput, {ENTER}
}
SendInput, {HOME}
} Catch, er {
MsgBox, er
Reload
}
}
actionShowMetadataNavigator() {
Global
module = tmp\module.txt
; clear old data
FileDelete %module%
FileAppend,, %module%
RunWait, system\inputbox.exe %module%
NewText := getTextFromFile()
If (NewText <> "") {
; go to service msgs
SendInput, ^!%KeyO%
SendInput, ^+%KeyC%
ActivateWindowByTitle("Ðåçóëüòàòû ïîèñêà")
Sleep 1
; Ïîëó÷àåì òåêóùåå îêíî
ControlGetFocus, WinType
If (WinType <> "V8Grid1") {
; Åñëè ýòî îêíî ïîèñêà - òîãäà ïåðåéäåì â äåðåâî, ïîñëàâ Òàá.
SendInput, {Tab}
}
; show search dlg
SendInput, ^%KeyF%
WinWait, Ïîèñê îáúåêòîâ ìåòàäàííûõ
pasteTextFromFile()
SendInput, {Enter}
Sleep 2000
ActivateWindowByTitle("Ðåçóëüòàòû ïîèñêà")
SendInput, ^%KeyA%
ClipWait
SendInput, {Left}{Enter}
putTextFromResultWindowInFile(0)
NewText := getTextFromFile()
If (NewText <> "") {
SendInput, ^{END}
RunWait, wscript scripts\scripts.js %module% gotoobject
NewText := getTextFromFile()
If (NewText <> "") {
SendInput, {Home}
SendInput, ^%KeyF%
SendInput +{ins}
SendInput, !{Insert}
ClipWait
SendInput, {Enter}
SendInput, {Enter}
}
}
}
}
showMenu() {
createMenuItems()
Menu, Popup, Show
}
actionRun1Script() {
module = tmp\module.os
SendInput ^{SC01E}^{ins}{Left}
ClipWait
FileDelete %module%
FileAppend, %Clipboard%, %module%, UTF-8
RunWait, cmd "/K system\OneScript\bin\oscript.exe tmp/module.os"
}
actionGoToPrevContainedWord() {
clipboard =
SendInput ^+{left}^{ins}{right}
RunWait, system\OneScript\bin\woscript.exe scripts\ÐàáîòàÑîÑëîâàìè.os prev,,
}
actionGoToNextContainedWord() {
clipboard =
SendInput ^+{right}^{ins}{left}
RunWait, system\OneScript\bin\woscript.exe scripts\ÐàáîòàÑîÑëîâàìè.os next,,
}
actionShowMethodName() {
; Global
; getTextUp()
RunWait, system\OneScript\bin\woscript.exe scripts\Íàâèãàöèÿ\ÍàâèãàöèÿÏîÌîäóëþ.os ÈìÿÌåòîäà,,
}
actionOneStyleSelection() {
; îòôîðìàòèðóåì âûäåëåíèå ñðåäñòâàìè 1Ñ, ò.ê. ó òîëüêî âûäåëåííîãî áëîêà íåäîñòàòî÷íî èíôîðìàöèè îá îòñòóïàõ
global
SendInput, !+%KeyF%
RunWait, system\OneScript\bin\woscript.exe scripts\OneStyle\Main.os,,Hide
}
actionWindowsManager() {
detect_hidden = 0
WinGet controls, ControlListHwnd
static WINDOW_TEXT_SIZE := 32767 ; Defined in AutoHotkey source.
VarSetCapacity(buf, WINDOW_TEXT_SIZE * (A_IsUnicode ? 2 : 1))
text := ""
Loop Parse, controls, `n
{
if !detect_hidden && !DllCall("IsWindowVisible", "ptr", A_LoopField)
continue
if !DllCall("GetWindowText", "ptr", A_LoopField, "str", buf, "int", WINDOW_TEXT_SIZE)
continue
if (buf = "Êîíôèãóðàöèÿ") {
continue
}
text .= buf "`r`n"
}
module = tmp\module.txt
FileDelete %module%
FileAppend, %text%, %module%, UTF-8
RunWait, system\SelectValueSharp.exe %module%
FileRead, text, tmp\module.txt
Loop Parse, controls, `n
{
if !DllCall("GetWindowText", "ptr", A_LoopField, "str", buf, "int", WINDOW_TEXT_SIZE)
continue
if (buf = text) {
WinActivate, ahk_id %A_LoopField%
}
}
}
actionResultSearchFilter() {
; Àêòèâèðîâàòü ðåçóëüòàò ïîèñêà
ActivateWindowByTitle("Ðåçóëüòàòû ïîèñêà")
clipboard =
; âûäåëèëè è ñêîïèðîâàëè äàííûå
SendInput, ^%KeyA%^{ins}
;SendInput, ^{ins}
ClipWait
SendInput, {home}
module = tmp\module.txt
FileDelete %module%
FileAppend, %Clipboard%, %module%, UTF-8
SendInput, {home}
RunWait, system\OneScript\bin\woscript.exe scripts\Íàâèãàöèÿ\ÍàâèãàöèÿÏîÌåòàäàííûì.os ÐåçóëüòàòûÏîèñêàÏåðåéòè,,Hide
if (ErrorLevel > 0) {
UpCount := ErrorLevel
ActivateWindowByTitle("Ðåçóëüòàòû ïîèñêà")
Loop %UpCount%
{
SendInput, {down}
}
SendInput, {ENTER}
}
}
actionContinueRow() {
SendInput, {SHIFTDOWN}{up}{up}{up}{SHIFTUP}^{Insert}
ClipWait
SendInput, {Right}
RunWait, system\OneScript\bin\woscript.exe scripts\ÐàáîòàÑÒåêñòîì.os ÏðîäîëæèòüÑòðîêóÊîììåíòàðèé
}
actionIncrements(kind) {
; SendInput, ^{ins}
; ClipWait
RunWait, system\OneScript\bin\woscript.exe scripts\ÐàáîòàÑÒåêñòîì.os Èíêðåìåíò %kind%
}
actionChoiceTemplate() {
RunWait, system\OneScript\bin\woscript.exe scripts\ÐàáîòàÑÒåêñòîì.os ÂûáðàòüØàáëîí
}
actionOpenObjectModuleExternal() {
Global
SendInput, {CtrlUp}
SendInput, {CtrlDown}%KeyT%{CtrlUp}
SendInput, {Tab}{Enter}{down}{Enter}
}
actionOpenMainFormExternal() {
Global
SendInput, {CtrlUp}
SendInput, {CtrlDown}%KeyT%{CtrlUp}
SendInput, {Tab}{Enter}{down}{down}{Enter}
}