1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 15:49:36 +02:00

Move pipe scripts into a subdirectory.

This commit is contained in:
James Crook 2017-12-20 19:57:03 +00:00
parent a084c3dbbf
commit b6138b1968
3 changed files with 36 additions and 2 deletions

View File

@ -0,0 +1,34 @@
# get-gui-structure.py
# Obtains all menus and all box locations from the currently running Audacity.
toname = '\\\\.\\pipe\\ToSrvPipe'
fromname = '\\\\.\\pipe\\FromSrvPipe'
tofile = open( toname, 'wt' )
fromfile = open( fromname, 'rt')
def sendCommand( command ) :
print( "Send: "+command )
tofile.write( command + '\r\n\0' )
tofile.flush()
def getResponse() :
result = ''
line = ''
while line != '\n' :
result += line
line = fromfile.readline()
return result
def doCommand( command ) :
sendCommand( command )
response = getResponse()
print( "Rcvd: " + response )
return response
def getStructure() :
doCommand( 'GetAllMenuCommands:' )
getStructure()

View File

View File

@ -1,6 +1,6 @@
# pipetest.py
# pipe-test.py
# Tests the audacity pipe. Sends 3 commands.
# Keep pipetest.py short!!
# Keep pipe-test.py short!!
# You can make more complicated longer tests to test other functionality
# or to generate screenshots etc in other scripts.