AntiGuide: AudaCityOnOff



PagePrincipale :: DerniersChangements :: ParametresUtilisateur :: Vous êtes 216.73.216.212 :: Signaler un abus :: le: 20250716 11:11:37
Ce programme est le coeur de AudaCityOnOffKey (& co.), il sert à télécommander la fonction lecture/pause de AudaCity

Le programme AudaCityOnOff:

installation (manuelle):

Appel:

Désinstallation:


La suite pour développeur

le programme (détecte automatiquement Audacity et basculement vers la fenêtre texte [si elle existe]):
copié ici, juste pour le visiteur pressé; le fichier à jour est dans le .zip ci dessus.

Public Class Form1
    Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As IntPtr, ByVal lpString As String, ByVal cch As Long) As Integer
    Private Declare Function GetForegroundWindow Lib "user32" () As IntPtr

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        po2()
    End Sub

    Public Function myGetForeGroundWindowTitle() As String
        Dim title As String = New String(" ", 200)

        Dim titleLength As Integer = GetWindowText(GetForegroundWindow(), title, Len(title) + 1)

        Return title

    End Function

     Private Sub po2()

        ' fenêtre Audacity
        Dim auda As String
        auda = myGetWindowTitleNameByProcessName("audacity")
        ' cherher cible
        '       Dim s As String = 
        Dim liste As String = myGetForeGroundWindowTitle()


        Try
            AppActivate(Trim(auda))
        Catch ex As Exception
            MsgBox("Pas trouvé la fenêtre Audacity " & vbCrLf & ex.Message)
            End
        End Try

        Application.DoEvents()
        Threading.Thread.Sleep(100)

        SendKeys.SendWait("p")
        Threading.Thread.Sleep(100)
        '    MsgBox(liste)
        If Len(liste) > 0 Then
            Try
                AppActivate(Trim(liste))
            Catch ex As Exception
                '       MsgBox("Echec activation de la fenêtre " & liste & vbCrLf & ex.Message)
                End
            End Try

        End If

        End
    End Sub

    Function myGetWindowTitleNameByProcessName(ByVal sProcessName As String) As String
        Dim sResult As String = ""
        For Each oProc As Process In Process.GetProcessesByName(sProcessName)
            sResult = (oProc.MainWindowTitle)
        Next oProc
        Return sResult
    End Function


End Class



title d'une autre fenêtre
http://www.vb-helper.com/howto_get_window_info.html
http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/97963365-8bf0-476f-9a98-bb026e65c4f5/

expertise:
est il possible de rediriger la touche "²" vers un raccourci ?
voir ce que l'on peut faire avec AutoHotkey