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:
parent
a084c3dbbf
commit
b6138b1968
34
scripts/piped-work/get-gui-structure.py
Normal file
34
scripts/piped-work/get-gui-structure.py
Normal 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()
|
0
scripts/pipe-test.pl → scripts/piped-work/pipe-test.pl
Executable file → Normal file
0
scripts/pipe-test.pl → scripts/piped-work/pipe-test.pl
Executable file → Normal 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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user