Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Autorun 
Author Message
FallenAngel



PostPosted: Tue Dec 30, 2025 21:04    Post subject: Reply with quote

Orion9
Нужна помощь с такой конструкцией.

Code:

ControlSetMouseAction /M 1 OpenDirInNewTabElseEnter
ControlSetMouseAction /M 2 OpenDirInNewTabElseEnter

Func OpenDirInNewTabElseEnter
   I = ItemAtCursor('index')
   If I >= 0 Then
      F = RequestInfo(1010 + ItemAtCursor('panel'))
      If ItemAtCursor('panel') <> RequestInfo(1000) Or Not ItemAtCursor('focused') Then MouseClick
      If ItemAtCursor('focused') Then
         If F > I Or F = -1 Then
            SendCommand 3003
         Else
            Switch StrLower(StrRight(StrPart(ItemAtCursor('text'), auTAB, 1), 4))
            Case '.exe', '.bat', '.cmd', '.lnk'
               CommandExec em_startelevated
               Case '.ps1'
                  ShowPopupMenu /I:16 '%commander_path%\PS.BAR'
            Else
               SendCommand cm_SrcQuickView
            EndSwitch
         EndIf
      EndIf
   Else
      SendCommand cm_SrcHideQuickView
   EndIf
EndFunc


Идея состоит в том, чтобы унифицировать подход. По СКМ должен всегда открываться Быстрый просмотр. А вот все частные случаи (новая вкладка, '.exe', '.bat', '.cmd', '.lnk' и '.ps1') только с удержание Shift.
Заранее спасибо.
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group