$code = get_selection() if ( $code != "" ) { $subname = string_dialog( "New sub name:", "OK" ) # fichier temporaire $processnum = shell_command("echo $$", "") $processnum = replace_in_string($processnum, "\n", "") $tmpfile = "/tmp/nedit" $processnum write_file( $code, $tmpfile ) $codestring = "/home/emmanuel/bin/refactor.pl " $subname " " $tmpfile if ( $subname != "" ) { $subgen = shell_command( $codestring, "" ) if ( $subgen != "" ) { replace_selection( $subgen ) } } # delete temp file shell_command( "rm " $tmpfile, "") }