Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Explicit
- '====================================================================
- Public Sub Main()
- asRegisterAppPath
- InitCommonControls
- If Not asIsInIDE Then asSetWindowResIconAll asGetThunderMainHandle(), IDI_APPICON
- DoIt
- End Sub
- Private Sub DoIt()
- Dim CmdLine As BStr
- CmdLine = asTrimEx(Command())
- If CmdLine = "" Then
- 'MsgBox "Использование: " & App.EXEName & "[.EXE] CommandToExecute", vbInformation
- asMsgBox "Использование: " & App.EXEName & "[.EXE] CommandToExecute", "A_MAIN"
- Exit Sub
- End If
- StartIt CmdLine
- End Sub
- Private Sub StartIt(ByVal CmdLine As BStr)
- Dim RC As Long
- If Not asIsKeyToggled(VK_SCROLL) Then PressScrollLock
- RC = asLaunchProcessAndWaitEx3(CmdLine)
- If RC <> 0 Then
- 'MsgBox "Ошибка " & asGetErrorNumber(RC) & ": " & _
- CRLF & asGetAPIErrorMessage(RC), vbCritical
- asMsgBox "Ошибка " & asGetErrorNumber(RC) & ": " & _
- CRLF & asGetAPIErrorMessage(RC), "A_MAIN"
- End If
- PressScrollLock
- End Sub
- Private Sub PressScrollLock()
- keybd_event VK_SCROLL, 0, 0, 0
- keybd_event VK_SCROLL, 0, KEYEVENTF_KEYUP, 0
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement